Ir al contenido principal

Discord.JS - Week 3

In this week i worked again on my Discord bot. I have edited a new command `!event <event here>`and I have modified the `!serverinfo` command. One very important thing I did is I solved a issue that made the bot repsond to any prefix.

!event command

This command is not 100% fiinished as I want to be able to put more variables on it. But currently when you use per eveample "!event Airshow Training @ 13:00 UTC+2" the bot first tags @everyone which gives a noddification to everyone in the server, then that @everybody message gets delted so it looks good when the bot send the Enbed message. In the enbed currently there is on varriable but i want to make it so there are also other variables like "!event <event titile> <event description> <event starting time> <event finish time>". After the bot has sent the enbed the bot reacts with a ✅ or a ❎ so people can say if they are coming to the event or not. Currently in discord.js you cant put in which order the bot will put the emojis but normally it does the checkmark first. (GIF above showing how it works)


!serverinfo modifications

I have complatly modified this command and added a lot more information about this server. First of all I made that the fields with not much information can be 2 next to each other so that the embed is smaller and it looks better. The I added the new information:
- Server Region
- Server ID
- AFK Channel
- AFK Timeout
- Roles


Prefix Fix

After asking other discord developers it turns out that the problem was that the following line was misssing:
  if (!message.content.startsWith(prefix)) return;

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: