mirror of
https://github.com/hazemKrimi/discord-bot.git
synced 2026-05-01 18:30:25 +00:00
25 lines
564 B
JavaScript
25 lines
564 B
JavaScript
require('dotenv').config();
|
|
|
|
const { CommandoClient } = require('discord.js-commando');
|
|
const path = require('path');
|
|
|
|
const client = new CommandoClient({
|
|
commandPrefix: 'b.'
|
|
});
|
|
|
|
client.registry
|
|
.registerDefaultTypes()
|
|
.registerGroups([
|
|
['music', 'Music Commands']
|
|
])
|
|
.registerDefaultGroups()
|
|
.registerDefaultCommands()
|
|
.registerCommandsIn(path.join(__dirname, 'commands'));
|
|
|
|
client.once('ready', () => {
|
|
client.user.setActivity('amsa7 lak7el');
|
|
});
|
|
|
|
client.login(process.env.BOT_TOKEN);
|
|
|
|
client.on('error', console.error); |