
Discord Bot
NODE | DISCORD.IO | JAVASCRIPT | AXIOS | RESTful API | HOSTING
Discord is a free all-in-one voice and text chat application for gamers. Discord is the gaming world's version of Slack. Similar to Slack, servers are broken into channels, however, these channels in Discord can be either text or voice. I created a discord bot for my own private server to allow members to enter special commands that will automatically send requests to external APIs and return requested data.
I utilized Discord.io to record and transport the information that users input into the discord channel to the back end server. After the data is received from the API, I again used Discord.io to display the formatted data to the user through an automated message from the discord bot. I implemented Node.js on the back-end for handling all of the RESTful API requests. I used the JavaScript switch statement to interpret the user's request and guide the information to the correct API.
An example of a user request is a user entering !apex SopaGrande into the channel. Through Discord.io I created a function that allows the bot to "listen" for a message starting with "!". From there the JavaScript switch statement looks at the string attached to the "!" which is "apex". In the case of "apex", an API GET request is sent to the stats API of a game called "Apex Legends" and returns all stats relative to the user "SopaGrande". Discord.io is then used to display the information to the channel through an automated message from the discord bot.
Finally, through the use of a personal Digital Ocean droplet, I hosted the discord bot remotely and it is now running 24/7 on my Discord server and all users have access to it.
Github Repo: https://github.com/Sethlimlee/DiscordBot

Shows the functionally of sending a !apex sopagrande command with the discord bot responding with the received data from the API.

The description of the discord bot on the Discord Developer Portal website.

The bot is hosted on my personal Digital Ocean Droplet allowing the bot to run 24/7.

Shows the functionally of sending a !apex sopagrande command with the discord bot responding with the received data from the API.