-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
34 lines (27 loc) · 1.21 KB
/
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
const { CommandoClient } = require('discord.js-commando');
const path = require('path');
const config = require('./config.json');
const client = new CommandoClient({
commandPrefix: './',
owner: '288855795951599617',
disableEveryone: true
});
client.registry
.registerDefaultTypes()
.registerGroups([
['role request', 'Role Request']
])
.registerDefaultGroups()
.registerDefaultCommands()
.registerCommandsIn(path.join(__dirname, 'commands'));
client.on('ready', () => {
client.user.setActivity(`./help`).catch(console.error);
console.log(`- Logged in as ${client.user.tag}!`);
});
client.on('message', message => {
if (message.author.id !== client.user.id && message.channel.id === "405552114170069003" && !message.content.startsWith(client.commandPrefix + 'agree')) return message.delete();
if (message.channel.id === '361120040524972032') message.delete({timeout: 3000});
if (message.author.id !== client.user.id && message.channel.id === "361120040524972032" && !message.content.startsWith(client.commandPrefix + 'agree')) return message.delete();
if (message.channel.id === '361120040524972032') message.delete({timeout: 3000});
});
client.login(config.token);