Ir al contenido principal

Discord.js - Week 2

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:


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

Entradas populares de este blog

discord.js and HTML&CSS together

This week I started with the other developers that we are making the disocrd bot to make the web dashboard, we first had to get the host working so one of them had a small server PC that we are now using. We bought a domain (www.walterbot.xyz) and started coding the website. First we made the landing page (first page you see when you log into the webite) and the menu, after that we started making the Disocrd authentication login panel, this allows us to know the servers that the specific user is in and if he is admin, form there on we can allow him to do the speciffic changes to the bot from the web dashboard. Right now we only got the function of changine the bot´s nickname and change its prefix.

Website Week 1

CAS PROJECT (www.wadj.ml) Week 1: This week I started creating a website for my CAS project. First I asked a friend which is also a web developer and has a own server, if he could host the website for me for free and he did. I first created the basics like the meun and and footer of the website on HTML. After the HTML part was fnished i played arround with CSS to make it look good. HTML only: With CSS: After I had the menu and footer I created the home page: