-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIndex.js
35 lines (22 loc) · 840 Bytes
/
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
35
/* Setup
1. Create a .env file (click add file then remane it to .env)
2. Put "token=" (without quotes) into the .env file followed by your Discord Bot token (No spaces!)
*/
const express = require("express");
const app = express();
app.listen(() => console.log("Server started"));
app.use('/ping', (req, res) => {
res.send(new Date());
});
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('message', message => {
// Here is where you need to code
if(message.content == "t") {
message.channel.send("@everyone [T] Training! Come to the Training Center for a chane at a Promotion!! https://www.roblox.com/games/4368863292/Mano-County-Training-Center");
}
});
client.login(process.env.token);