2023-12-17 14:55:27 -05:00
|
|
|
|
const CommandError = require('../CommandModules/command_error')
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
name: 'tpsbar',
|
|
|
|
|
//<< this one line of code broke it lmao
|
|
|
|
|
description:['tps'],
|
2023-12-20 11:54:03 -05:00
|
|
|
|
trustLevel: 0,
|
2023-12-17 14:55:27 -05:00
|
|
|
|
aliases:['tickspersecondbar', 'tickspersecond', 'tps'],
|
|
|
|
|
execute (context) {
|
|
|
|
|
const bot = context.bot
|
|
|
|
|
const source = context.source
|
|
|
|
|
const args = context.arguments
|
|
|
|
|
switch (args[0]) {
|
|
|
|
|
case 'on':
|
2024-01-26 21:24:08 -05:00
|
|
|
|
if(!bot.options.Core.CorelessMode){
|
|
|
|
|
throw new CommandError('Coreless mode is active can not execute command!')
|
|
|
|
|
}else{
|
|
|
|
|
bot.tps.on()
|
|
|
|
|
|
2023-12-17 14:55:27 -05:00
|
|
|
|
source.sendFeedback({text: 'TPSBar is now enabled', color:'green'})
|
2024-01-26 21:24:08 -05:00
|
|
|
|
}
|
|
|
|
|
break
|
2023-12-17 14:55:27 -05:00
|
|
|
|
case 'off':
|
2024-01-26 21:24:08 -05:00
|
|
|
|
if(!bot.options.Core.CorelessMode){
|
|
|
|
|
throw new CommandError('Coreless mode is active can not execute command!')
|
|
|
|
|
}else{
|
|
|
|
|
bot.tps.off()
|
2023-12-17 14:55:27 -05:00
|
|
|
|
source.sendFeedback({text:'TPSBar is now disabled', color:'red'})
|
2024-01-26 21:24:08 -05:00
|
|
|
|
}
|
2023-12-17 14:55:27 -05:00
|
|
|
|
break
|
|
|
|
|
default:
|
|
|
|
|
throw new CommandError('Invalid argument')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//[%s] %s › %s
|
|
|
|
|
//was it showing like that before?
|
|
|
|
|
// just do text bc too sus rn ig
|
|
|
|
|
// You should remove the with thing and the translate and replace
|
|
|
|
|
|
|
|
|
|
// Parker, why is hashing just random characters???
|
|
|
|
|
//wdym
|