Added the 'help' command. Output is unordered thought

This commit is contained in:
ION606
2022-05-20 12:19:27 +03:00
parent 8a1246edac
commit 4cd8a42985
3 changed files with 49 additions and 11 deletions
+10 -7
View File
@@ -2,13 +2,16 @@ module.exports ={
name: "help",
description: "Gets help for all of Selmer Bot's commands",
execute(message, args, Discord, Client, bot) {
const newEmbed = new Discord.MessageEmbed()
.setColor('#002eff')
.setTitle('My professional resume')
//.setURL('https://discordjs.guide/popular-topics/embeds.html#embed-preview')
//.setDescription('My professional resume')
.setImage('https://github.com/ION606/selmerBot/blob/main/Sleemer_Bringsjorgend.png?raw=true')
let temp = "***Selmer Bot Commands:***\n";
message.channel.send({ embeds: [newEmbed] });
bot.commands.sort((a, b) => a.name[0] < b.name[0]);
bot.commands.forEach((comm) => {
if (comm.name != 'verify') {
temp += `${comm.name.toLowerCase()} - ${comm.description}\n`;
}
});
message.channel.send(temp);
}
}