FridayNightFunkinBoyfriendBot/commands/tps.js

44 lines
1.3 KiB
JavaScript
Raw Normal View History

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':
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'})
}
break
2023-12-17 14:55:27 -05:00
case 'off':
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'})
}
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