DiscordJS-base-handler is a functional, beginner friendly Discord Modular Bot written in JavaScript. This DiscordJS base handler contains ONLY slash commands.
const { SlashCommandBuilder } = require("@discordjs/builders");
const { EmbedBuilder } = require('discord.js');
module.exports = {
...new SlashCommandBuilder()
.setName("YOUR_COMMAND_NAME")
.setDescription("Type here your description"),
run: async (client, interaction) => {
try {
return 'YOUR FUNCTION HERE';
} catch (e) {
console.log(String(e.stack))
return interaction.channel.send({embeds: [new EmbedBuilder()
.setColor(0xf13737)
.setFooter({ text: process.env.APP_NAME, iconURL: client.user.avatarURL(client.user) })
.setTimestamp()
.setTitle(`❌ ERROR | An error occurred`)
.setDescription(`\`\`\`${e.message ? String(e.message).substr(0, 2000) : String(e).substr(0, 2000)}\`\`\``)
]});
}
},
};
Features | Supported |
---|---|
supports subfolders | ✅ |
Slash Command handler | ✅ |
Database Support | ✅ |
Debug System (Coming soon) | ❌ |
Commands | Description | Version |
---|---|---|
/help |
returns help list | 1.0 |
/ping |
returns websocket ping | 1.1 |
/avatar |
display a users avatar | 1.0 |
/echo |
echo your message | 1.0 |
/clearchat |
delete your messages | 1.0 |
/balance |
Check your balance | 1.0 |
/work |
Do some work to earn money | 1.0 |
- Sloscow
- SVNKVN9