forked from L-Ordre-Des-Devs/Roger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
30 lines (26 loc) · 789 Bytes
/
index.js
File metadata and controls
30 lines (26 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 notion = require("@notionhq/client")
const { Client, Collection, GatewayIntentBits } = require("discord.js");
const {
DefaultWebSocketManagerOptions: {
identifyProperties
}
} = require("@discordjs/ws");
// To show the bot on mobile :D (method from : https://stackoverflow.com/a/77072376)
identifyProperties.browser = "Discord Android";
// Discord app
let client = new Client({
intents: [
GatewayIntentBits.Guilds
]
});
// Notion app (for free data base)
client.notion = new notion.Client({
auth: process.env.NOTION_TOKEN,
LogLevel: notion.LogLevel.DEBUG
});
module.exports = client;
// Global Variables
client.commandsFiles = new Collection();
// Initializing the project
require("./handler")(client);
client.login(process.env.TOKEN);