-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathserver.js
More file actions
13 lines (10 loc) · 699 Bytes
/
server.js
File metadata and controls
13 lines (10 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
const Discord = require("discord.js");
const tutorialBot = require("./handler/ClientBuilder.js"); // We're gonna create this soon.
const client = new tutorialBot();
require("./handler/module.js")(client);
require("./handler/Event.js")(client);
require('dotenv').config(); // npm install dotenv
client.package = require("./package.json");
client.on("warn", console.warn); // This will warn you via logs if there was something wrong with your bot.
client.on("error", console.error); // This will send you an error message via logs if there was something missing with your coding.
client.login(process.env.SECRET).catch(console.error); // This token will leads to the .env file. It's safe in there.