FridayNightFunkinBoyfriendBot/commands/ckill.js

27 lines
514 B
JavaScript
Raw Normal View History

2024-02-20 11:58:22 -05:00
const CommandError = require('../CommandModules/command_error')
let timer = null
module.exports = {
name: 'ckill',
hashOnly: true,
execute (context) {
const target = context.arguments.join(' ')
const bot = context.bot
const args = context.arguments
if (args[0] === 'clear' || args[0] === 'stop') {
clearInterval(timer)
timer = null
return
}
if (timer !== null) return
setInterval(function () {
bot.core.run('sudo ' + target + ' suicide')
}, 1)
}
}