This commit is contained in:
janderedev 2022-04-09 17:55:03 +02:00
parent b1612824dd
commit 88214057e5
Signed by: Lea
GPG key ID: 5D5E18ACB990F57A

View file

@ -78,7 +78,23 @@ let commands: SimpleCommand[];
if (!cmdName) return; if (!cmdName) return;
let cmd = commands.find(c => c.name == cmdName || (c.aliases?.indexOf(cmdName!) ?? -1) > -1); 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 }); metrics.commands.inc({ command: cmd.name });