Browse Source

initial structure

pull/1/head
calexil 4 years ago
parent
commit
bd6f528b13
  1. 1
      Procfile
  2. 15
      bot.js
  3. 13
      package.json

1
Procfile

@ -0,0 +1 @@ @@ -0,0 +1 @@
worker: node bot.js

15
bot.js

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log('I am ready!');
});
client.on('message', message => {
if (message.content === 'ping') {
message.reply('pong');
}
});
// THIS MUST BE THIS WAY
client.login(process.env.BOT_TOKEN);

13
package.json

@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
{
"name": "Test",
"description": "Test",
"version": "0.0.0",
"main": "bot.js",
"scripts": {
"start": "node bot.js"
},
"dependencies": {
"discord.js": "11.1.0",
"request": "2.81.0"
}
}
Loading…
Cancel
Save