Health

RoVer: Roblox Verification Discord Bot

For deployment I chose Zeit Now, you could genuinely use Heroku however i found Zeit Now to be easier to setup and use. with the intention to install to zeit now we can need to make our code create a http server.

We’re doing that due to the fact Discord bot now will now not paintings if we don’t run any http servers. so you will handiest want to add this.

const Discord = require(‘discord.js’);

const client = new Discord.client();

const http = require(‘http’);

http.createServer((req, res) =>

res.writeHead(200,

‘content material-kind’: ‘textual content/simple’

);

res.write(‘whats up’);

res.give up();

).listen(4000);

customer.login(‘token’);

purchaser.on(‘equipped’, () =>

console.log(‘The bot is prepared’);

);

patron.on(‘message’, (msg) =>

if (msg.content material.includes(‘bot’))

msg.reply(‘Did you point out me?’);

});

Then we want to apply zeit now v1 rather than v2 due to the fact v2 doesn’t let us preserve the node code up 24/7. So we will must create a document called now.

Json for you to contain the following:

“model”: 1

Then on your bundle.json document which probable looks as if this:

“name”: “test”,

“model”: “1.0.0”,

“description”: “”,

“primary”: “index.js”,

“dependencies”:

“discord.js”: “^eleven.four.2”

,

“devDependencies”: ,

“scripts”:

“test”: “echo \”blunders: no take a look at certain\” && exit 1″

,

“key phrases”: [],

“writer”: “”,

“license”: “ISC”

trade the “check”: echo \”blunders: no take a look at detailed\” && go out 1″ to

“begin”: “node index.js”

Then It is Time for Deployment

After the deployment is performed you will get a link inside the console. We are not performed but. there may be one problem that’s that the bot will car freeze because zeit now will transfer it off after 1 hour of state of being inactive so we want to run this command to prevent that.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top