Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const showResult = res => {
const messages = {
pwned: `${logSymbols.error} Pwned ${chalk.yellow(res.count)} times!`,
safe: `${logSymbols.success} Yay! No records found!`
};
console.log();
if (res.pwned) {
console.log(cowsay.think({text: messages.pwned, e: 'oO'}));
showWarning();
} else {
console.log(cowsay.say({text: messages.safe, f: 'tux'}));
}
return res;
};
export async function run (client: ReknownClient, message: Message, args: string[]) {
if (!args[1]) return client.functions.noArg(message, 1, 'a message for a cow to think about.');
const msg = args.slice(1).join(' ');
message.channel.send(`\`\`\`${think({ text: msg })}\`\`\``);
}