forked from aniket091/Meme-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
30 lines (21 loc) · 789 Bytes
/
index.js
File metadata and controls
30 lines (21 loc) · 789 Bytes
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
const Discord = require("discord.js");
const Meme = require("memer-api");
const { prefix, token, api_token } = require("./botconfig/config.json");
const colors = require("colors");
const client = new Discord.Client({
restTimeOffset: 0,
disableEveryone: true,
partials: ['MESSAGE', 'CHANNEL', 'REACTION']
})
client.login(token);
client.memer = new Meme(api_token) // Memer API Token from - https://discord.gg/emD44ZJaSA
client.prefix = prefix;
client.commands = new Discord.Collection();
client.aliases = new Discord.Collection();
client.cooldowns = new Discord.Collection();
["command", "events"].forEach(handler => {
require(`./handlers/${handler}`)(client);
});
module.exports = client;
client.on("warn", (info) => console.log(info));
client.on("error", console.error);