-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
35 lines (28 loc) · 863 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Import discord.js commando module
const { CommandoClient } = require('discord.js-commando');
const path = require('path');
const TOKEN = require('./config');
const token = TOKEN;
// Import youtube downloader module
const ytdl = require('ytdl-core');
// Create new instance of discord.js commando
const client = new CommandoClient({
commandPrefix: '!',
unknownCommandResponse: true,
disableEveryone: true,
owner: '125450395563720704'
});
// register custom command groups
client.registry
.registerGroups([
['group1', 'Our First Command Group'],
['group2', 'Our Second Command Group'],
['group3', 'Our Third Command Group'],
['group4', 'Our Fourth Command Group']
])
.registerDefaults()
.registerCommandsIn(path.join(__dirname, 'commands'));
client.on('ready', () => {
console.log('Logged in!');
});
client.login(token);