FridayNightFunkinBoyfriendBot/commands/tps.js
2024-01-27 11:11:54 -05:00

44 lines
No EOL
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'tpsbar',
//<< this one line of code broke it lmao
description:['tps'],
trustLevel: 0,
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.enabled){
throw new CommandError('Coreless mode is active can not execute command!')
}else{
bot.tps.on()
source.sendFeedback({text: 'TPSBar is now enabled', color:'green'})
}
break
case 'off':
if(!bot.options.Core.enabled){
throw new CommandError('Coreless mode is active can not execute command!')
}else{
bot.tps.off()
source.sendFeedback({text:'TPSBar is now disabled', color:'red'})
}
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