forked from Garlic-Team/gcommands
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
44 lines (39 loc) · 1.4 KB
/
test.js
File metadata and controls
44 lines (39 loc) · 1.4 KB
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
36
37
38
39
40
41
42
43
44
const Discord = require("discord.js");
const { GCommands } = require("./src/index");
const client = new Discord.Client();
const axios = require("axios")
client.on("ready", () => {
const GCommandsClient = new GCommands(client, {
cmdDir: "commands",
eventDir: "events", //when you want event handler
language: "czech", //english, spanish, portuguese, russian, german, czech, slovak,
unkownCommandMessage: true, //send unkown command message true/false
slash: {
slash: 'both', //true = slash only, false = only normal, both = slash and normal
prefix: '.'
},
defaultCooldown: 3,
database: {
type: "mongodb", //sqlite/mongodb
url: "mongodb+srv://" //mongourl
}
})
GCommandsClient.on('debug', (debug) => {console.log(debug)} );
client.dispatcher.addInhibitor((cmd, slash, message) => {
if(message && message.author.id == "126454") {
message.channel.send("blacklisted")
return false;
}
if(slash && slash.member.user.id == "126454")
client.api.interactions(slash.id, slash.token).callback.post({
data: {
type: 4,
data: {
flags: 64,
content: "blacklisted"
}
}
});
})
})
client.login("token")