feat(informer): ✨ actually add a command for info plugin
This commit is contained in:
		| @@ -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()) | ||||
|   | ||||
| @@ -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 } | ||||
		Reference in New Issue
	
	Block a user