feat(informer): actually add a command for info plugin

This commit is contained in:
jay 2021-01-05 11:32:33 +05:00
parent f38ad8c819
commit 3219ec6155
2 changed files with 22 additions and 1 deletions

View File

@ -396,6 +396,9 @@ function command(username, message) {
break
}
break
case "info":
cfg.plugins.informer.command(message_parts.splice(1))
break
case "ride":
case "mount":
bot.mount(bot.nearestEntity())

View File

@ -10,6 +10,24 @@ function block() {
cfg.quiet || bot.chat(info.join(": "))
}
function command(message_parts) {
switch (message_parts.length) {
case 0:
case 1:
switch (message_parts[0]) {
case "block":
default:
block()
break;
}
break;
default:
break;
}
}
const load = (config) => {
cfg = config
bot = cfg.bot
@ -21,4 +39,4 @@ const load = (config) => {
const unload = () => {}
module.exports = { load, unload, block }
module.exports = { load, unload, command, block }