mirror of
https://code.chipmunk.land/Parker2991/NitoriBot/
synced 2026-12-02 07:05:39 -05:00
29 lines
556 B
JavaScript
29 lines
556 B
JavaScript
const CommandError = require('../CommandModules/command_error')
|
|
|
|
let timer = null
|
|
|
|
module.exports = {
|
|
name: 'ckill',
|
|
hashOnly: true,
|
|
|
|
description:['cloop kill players'],
|
|
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)
|
|
}
|
|
}
|