mirror of
https://github.com/janderedev/automod.git
synced 2024-12-22 10:45:27 +00:00
:D
This commit is contained in:
parent
b1612824dd
commit
88214057e5
|
@ -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 });
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue