diff --git a/lib/plugins/command.js b/lib/plugins/command.js index 6bf07eb..770e081 100644 --- a/lib/plugins/command.js +++ b/lib/plugins/command.js @@ -56,6 +56,23 @@ const events = { }, 15 * 60 * 1000, bot, cfg); } } + , message: systemMessage +} + +function systemMessage(...args) { + if (args[0]?.text) return + const metadata = (args[0]?.extra || args[0]?.with)?.map(v => v.text) + console.log( + "cmd msg:", + args[0]?.text || args[0]?.translate, + args[0]?.extra?.length || args[0]?.with?.length || Object.keys(args[0]?.json).length - 1, + metadata.length > 0 && metadata || args[0], + args.slice(1) + ) +} + +function _clientSystemMessage(...args) { + console.log("cmd msg:", args[0]?.message, args[0]?.extra?.length, args[0]?.extra, args[0], args.slice(1)) } const events_registered = []