In this week I have made some development on my discord bot. The major thing I did this week puting the bots in a server PC I got. The serverPC is runing a version of Debian Linux. I had never used any type of linux machines and i encuntured some problems trying to get the bots runing on the server.
The first thing i did is download the node_modules that are needed to download the disocrd.js (it is a "integgration" for javascript to be able to create discord bot. It has the guild information and much more.)
Then I had to install the disocrd.js modules (**npm install discord.js --save**) here is were all the problems started.
In every command of the bot you have to have the constant which declared discord.js and in half of my constants i had the following:
this worked perfectly on widows machines which was the machine i started making the bots and testing them.
When i tried to run the bot is got the following error:
I spent over 15 hours trying to find the errors, asking other discord developers if they knew why but no one had an idea. When I was about to give up i suddenly came to the idea that the ./node_modules/disocrd.js folder was everything in lower case. So I change all the code for the constant of discord to this:
and it finally worked!
the next thing I did is install something called pm2 which gives the default cmd prompt more option like monitoring:
The finally thing I did is try to get accepted into disocrd bot list program (it is an offical program from discord). I submited my bots and after waiting for 8 hours it got accepted;
Currently my Utility bot is being used in 14 servers with a total of 9650 users.
My secound Metar bot is being used in 12 server with a total of 12000users.
The first thing i did is download the node_modules that are needed to download the disocrd.js (it is a "integgration" for javascript to be able to create discord bot. It has the guild information and much more.)
Then I had to install the disocrd.js modules (**npm install discord.js --save**) here is were all the problems started.
In every command of the bot you have to have the constant which declared discord.js and in half of my constants i had the following:
const Disocrd = require("Disocrd.js");
this worked perfectly on widows machines which was the machine i started making the bots and testing them.
When i tried to run the bot is got the following error:
I spent over 15 hours trying to find the errors, asking other discord developers if they knew why but no one had an idea. When I was about to give up i suddenly came to the idea that the ./node_modules/disocrd.js folder was everything in lower case. So I change all the code for the constant of discord to this:
const Discord = require("discord.js");
and it finally worked!
the next thing I did is install something called pm2 which gives the default cmd prompt more option like monitoring:
The finally thing I did is try to get accepted into disocrd bot list program (it is an offical program from discord). I submited my bots and after waiting for 8 hours it got accepted;
Currently my Utility bot is being used in 14 servers with a total of 9650 users.
My secound Metar bot is being used in 12 server with a total of 12000users.



Comentarios
Publicar un comentario