-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
55 lines (39 loc) · 1.31 KB
/
index.js
File metadata and controls
55 lines (39 loc) · 1.31 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
45
46
47
48
49
50
51
52
53
54
55
// Libraries
const Eris = require("eris");
const chalk = require("chalk");
const moment = require("moment");
const config = require("./config");
// Intiialize the client
const client = new Eris.CommandClient(
// Discord token
config.discordToken,
// Client options
{
disableEvents: {
TYPING_START: true,
},
// all of them
// see: https://discord.com/developers/docs/topics/gateway#gateway-intents
// binary 111 1111 1111 1111 (all bits from 0 to 14 set) is 32767
intents: 32767
},
// Command options
{
description: "A bot made by Visate#7752 (ID: 97198953430257664)\n\nPM @Visate#7752 if you have any suggestions for the bot!",
owner: "",
prefix: config.prefixes,
defaultCommandOptions: {
caseInsensitive: true,
}
}
);
// Attach the config to the client
client.config = config;
// Logging methods
client.log = (...msg) => console.log(chalk.green.bold(`[LOG] [${moment().format("MMM DD HH:mm:ss")}]`), ...msg);
client.error = (...msg) => console.log(chalk.bgRed.white.bold(`[ERR] [${moment().format("MMM DD HH:mm:ss")}]`), ...msg);
client.warn = (...msg) => console.log(chalk.bgYellow.white.bold(`[WRN] [${moment().format("MMM DD HH:mm:ss")}]`), ...msg);
// Register modules
require("./util/loadModules")(client);
// Connect the client
client.connect();