From 88214057e547001f36b28a2cd3488e7233d0ee8b Mon Sep 17 00:00:00 2001 From: janderedev Date: Sat, 9 Apr 2022 17:55:03 +0200 Subject: [PATCH] :D --- bot/src/bot/modules/command_handler.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/bot/src/bot/modules/command_handler.ts b/bot/src/bot/modules/command_handler.ts index 5c2ad2a..6f91d24 100644 --- a/bot/src/bot/modules/command_handler.ts +++ b/bot/src/bot/modules/command_handler.ts @@ -78,7 +78,23 @@ let commands: SimpleCommand[]; if (!cmdName) return; let cmd = commands.find(c => c.name == cmdName || (c.aliases?.indexOf(cmdName!) ?? -1) > -1); - if (!cmd) return; + if (!cmd) { + // lil easter egg + + const cmds = [ + 'apt', 'pacman', 'visudo', 'apk', 'cat', 'shutdown', 'reboot', + ]; + if (msg.author && guildPrefix == 'sudo' && config?.spaceAfterPrefix) { + if (cmds.includes(cmdName)) { + await msg.reply(`${msg.author.username} is not in the sudoers file. This incident will be reported`); + } + else if (cmdName == 'echo') { + await msg.reply(`What kind of monster runs echo as root?`); + } + } + + return; + } metrics.commands.inc({ command: cmd.name });