-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
24 lines (21 loc) · 784 Bytes
/
Copy pathmain.js
File metadata and controls
24 lines (21 loc) · 784 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
console.log("Starting Bluepillbot")
console.log("Loading Libraries...")
const Discord = require('discord.js');
const fs = require('fs')
bluepillid = "591085044471431178"
console.log("Connecting to Discord...")
const client = new Discord.Client();
client.on('message', async function(message) {
username = message.author.username
if(message.channel instanceof Discord.DMChannel) {
console.log(`${username} (DM): ${message.toString()}`)
} else {
console.log(`${username} (#${message.channel.name}, ${message.guild.name}): ${message.toString()}`)
}
await message.react(bluepillid)
})
client.on('ready', () => {
console.log(`Connected to Discord.`);
});
const token = fs.readFileSync('token.txt').toString().slice(0, -2)
client.login(token)