forked from Garlic-Team/TicketBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
34 lines (30 loc) · 1.03 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
require("dotenv").config()
const Discord = require('discord.js')
const { GCommands } = require("gcommands");
require("./classes/TextChannel")
Discord.Constants.DefaultOptions.ws.properties.$browser = "Discord Android";
const client = new Discord.Client({ partials: ['MESSAGE', 'REACTION', 'GUILD_MEMBER']});
client.tickets = {
category: process.env.ticketCategory,
closedCategory: process.env.ticketClosedCategory,
moderatorRole: process.env.ticketModeratorRole
}
client.on('ready', async () => {
client.user.setActivity({ type: "COMPETING", name: `docs.karot.xyz`});
const GCommandsClient = new GCommands(client, {
cmdDir: "commands/",
eventDir: "events/",
unkownCommandMessage: false,
language: "english",
slash: {
slash: 'both',
prefix: '.'
},
defaultCooldown: 1,
})
GCommandsClient.on("debug", (debug)=>{
console.log(debug)
})
console.log('logged in')
})
client.login(process.env.token)