2024-07-06 11:02:11 -04:00
|
|
|
//HOW TO WRITE CLASS JS
|
|
|
|
const parse = require("../util/chatparse.js")
|
|
|
|
class Command{
|
|
|
|
constructor (uuid,user,nick,cmd,prefix,bot,verify){
|
2024-07-16 16:43:54 -04:00
|
|
|
this.send = (text,uuid)=>{bot.tellraw(uuid?uuid:"@a",text)};
|
2024-07-06 11:02:11 -04:00
|
|
|
this.reply = text => bot.tellraw(uuid,text);
|
|
|
|
this.uuid = uuid;
|
|
|
|
this.username = user;
|
|
|
|
this.nickname = nick;
|
|
|
|
this.command = cmd;
|
|
|
|
this.prefix = prefix;
|
|
|
|
this.bot = bot;
|
|
|
|
this.type = 'minecraft';
|
|
|
|
this.index = bot.id;
|
|
|
|
this.args = cmd.split(' ').slice(1);
|
|
|
|
this.verify = verify;
|
2024-07-16 17:12:33 -04:00
|
|
|
this.host = bot.host.host;
|
|
|
|
this.port = bot.host.port;
|
2024-07-06 11:02:11 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = Command;
|