@GarethDwyer1/

discord-bot-node

Nodejs

No description

fork
loading
Files
  • index.js
  • keep_alive.js
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const Discord = require('discord.js');
const keep_alive = require('./keep_alive.js')

const client = new Discord.Client();
const token = process.env.DISCORD_BOT_SECRET;

client.on('ready', () => {
  console.log("I'm in");
  console.log(client.user.username);
});

client.on('message', msg => {
    if (msg.author.id != client.user.id) {
        var rev = msg.content.split('j').reverse().join('');
        msg.channel.send(rev);
    }
});

client.login(token);
node v10.16.0