mirror of
https://code.chipmunk.land/Parker2991/NitoriBot/
synced 2026-12-01 14:45:43 -05:00
FNFBoyfriendBot v4.3.4
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// TODO: Improve how messages are stringified
|
||||
const ChatMessage = require('prismarine-chat')('1.20.2')
|
||||
const stringify = message => new ChatMessage(message).toString()
|
||||
|
||||
class CommandError extends Error {
|
||||
constructor (message, filename, lineError) {
|
||||
super(stringify(message), filename, lineError)
|
||||
this.name = 'CommandError'
|
||||
this._message = message
|
||||
|
||||
}
|
||||
|
||||
get message () {
|
||||
return stringify(this._message)
|
||||
}
|
||||
}
|
||||
module.exports = CommandError
|
||||
@@ -0,0 +1,18 @@
|
||||
class CommandSource {
|
||||
constructor (player, sources, hash = false, discordMessageEvent = null, consoleOnly = sources) {
|
||||
this.player = player
|
||||
this.sources = sources
|
||||
this.hash = hash
|
||||
this.consoleOnly = consoleOnly
|
||||
this.discordMessageEvent = discordMessageEvent
|
||||
this.displayName = player
|
||||
}
|
||||
|
||||
sendFeedback () {}
|
||||
|
||||
sendError (message) {
|
||||
this.sendFeedback([{ text: '', color: 'red' }, message], false)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = CommandSource
|
||||
Reference in New Issue
Block a user