botv12/util/Command.js

23 lines
676 B
JavaScript
Raw Normal View History

2024-11-19 20:05:19 -05:00
import settings from '../settings.js'
2024-10-23 23:35:21 -04:00
export default class Command {
2024-11-19 20:05:19 -05:00
constructor (uuid, user, nick, cmd, senderType, msgType, msgSubtype, prefix, bot, verify) {
this.uuid = uuid
this.reply = text => bot.tellraw(uuid, text)
this.username = user
this.nickname = nick
this.command = cmd
this.type = senderType
this.msgType = msgType
this.msgSubtype = msgSubtype
this.args = cmd.split(' ').slice(1)
this.cmdName = cmd.split(' ')[0]
this.prefix = prefix
this.colors = settings.colors
this.lang = settings.defaultLang
this.verify = verify
this.host = bot.host.host
this.port = bot.host.port
this.bot = bot
}
}