Browse Source

initial structure

tags/Beta0.1
calexil 2 years ago
parent
commit
bd6f528b13
3 changed files with 29 additions and 0 deletions
  1. 1
    0
      Procfile
  2. 15
    0
      bot.js
  3. 13
    0
      package.json

+ 1
- 0
Procfile View File

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

+ 15
- 0
bot.js View File

@@ -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
- 0
package.json View File

@@ -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