Send a message on guild join

This commit is contained in:
Dragon Fire
2020-07-07 17:10:34 -04:00
parent 1d2ae54f2b
commit 98a8aba9b8
8 changed files with 22 additions and 10 deletions
+1 -2
View File
@@ -21,9 +21,8 @@ module.exports = class UnknownCommandCommand extends Command {
const command = msg.content.match(this.client.dispatcher._commandPatterns[this.client.commandPrefix]);
const str = command ? command[2] : msg.content.split(' ')[0];
const results = didYouMean(str, commands, { returnType: ReturnTypeEnums.ALL_SORTED_MATCHES });
const inGuild = msg.guild ? undefined : null;
return msg.reply(stripIndents`
Unknown command. Use ${msg.anyUsage('help', inGuild, inGuild)} to view the command list.
Unknown command. Use ${this.client.registry.commands.get('help').usage()} to view the command list.
${results.length ? `Did You Mean: ${results.slice(0, 5).map(c => `\`${c}\``).join(', ')}` : ''}
`);