botv12/util/Command.js

22 lines
797 B
JavaScript
Raw Normal View History

2024-10-23 23:35:21 -04:00
import { default as settings } from '../settings.json' with {type: "json"}
export default class Command {
2024-10-26 22:10:16 -04:00
constructor (uuid, user, nick, cmd, senderType, msgType, msgSubtype, prefix, bot, verify, prefs) {
2024-10-23 23:35:21 -04:00
this.uuid=uuid;
this.reply = text => bot.tellraw(uuid, text)
this.username = user;
this.nickname = nick;
2024-10-27 01:23:28 -04:00
this.command = cmd;
this.type = senderType;
this.msgType = msgType;
this.msgSubtype = msgSubtype;
2024-10-23 23:35:21 -04:00
this.args = cmd.split(' ').slice(1)
this.cmdName = cmd.split(' ')[0]
this.prefix = prefix
this.colors = settings.colors
2024-10-27 01:23:28 -04:00
this.lang = settings.defaultLang
2024-10-26 22:10:16 -04:00
this.verify = verify
2024-10-24 00:44:37 -04:00
this.host = bot.host.host
this.port = bot.host.port
2024-10-26 22:10:16 -04:00
this.bot = bot
2024-10-23 23:35:21 -04:00
}
}