-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
49 lines (42 loc) · 1.68 KB
/
main.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
const { Intents } = require("discord.js");
const { GCommandsClient } = require("gcommands");
const mysql = require('mysql');
var con = mysql.createConnection({
host: "127.0.0.1",
user: "root",
database: "servers"
});
con.connect(function(err) {
if (err) throw err;
console.log("Connected!");
});
/*
ONLY EDIT THE PREFIX BELOW! AND THE TOKEN!
DO NOT MESSAGE ME IF YOU BREAK SOMETHING I DO NOT CARE!
*/
const client = new GCommandsClient({
cmdDir: "commands/",
caseSensitiveCommands: true, // true or false | whether to match the commands' caps
caseSensitivePrefixes: true, // true or false | whether to match the prefix in message commands
unkownCommandMessage: false, // true or false | send unkownCommand Message
language: "english", // english, spanish, portuguese, russian, german, czech, slovak, turkish, polish, indonesian, italian
commands: {
slash: "false", //true = slash only, false = only normal, both = slash and normal
context: "false", // https://gcommands.js.org/docs/#/docs/main/dev/typedef/GCommandsOptionsCommandsContext
prefix: ".", // for normal commands
},
defaultCooldown: "3s",
// database: "url",
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_MESSAGES]
/* DB SUPPORT
* redis://user:pass@localhost:6379
* mongodb://user:pass@localhost:27017/dbname
* sqlite://path/to/database.sqlite
* postgresql://user:pass@localhost:5432/dbname
* mysql://user:pass@localhost:3306/dbname
*/
});
client.on("ready", () => {
console.log("Ready");
});
client.login("");