Working on my Discord Bot (Free Friday 5/17/24) (makeup)

UncategorizedLeave a Comment on Working on my Discord Bot (Free Friday 5/17/24) (makeup)

Working on my Discord Bot (Free Friday 5/17/24) (makeup)

Today I worked on my Discord Bot and added two commands, a help command and a roll dice command. The roll dice command takes in an argument for how many sides the dice will be, then it randomly selects a number between 1 and the number you entered, the default would be 6. A very, very simple function.

Next is part of the code that scans for messages in all the channels. If it sees “*roll” it in message, it will attempt to get the argument given and use the roll function to generate the random number and send it back to the user. If no argument is given, it just calls the function, since it defaults to 6.

Here you can see me using the bot in action!

Next up, the help command just gives a list of all commands available, nothing fancy. I plan on making this better by adding an embedded message.

Here is most of the code:

Hello! My name's Anthony, I'm 18, and I'm super passionate about everything computers, but I love game & software development the most. I'm hardworking, and I'm always looking for something to create or tasks to complete. I'm also always excited to learn something new!

Leave a Reply

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

Back To Top