Inspiration

To bring students across the world together in this online age together with a discord bot that could help students communicate with each other with the unique translation feature.

What it does

Gives international students the ability to translate to a selected language, provides dictionary definitions, urban dictionary definitions, image search, play music (play/pause/skip/stop/resume).

How we built it

Built with node.js using the discord module, and various other modules. Had to study what the discord module(s) support, watched/read tutorials on how to integrate the modules together. Created application via the discord dev portal. Made application on discord website. Added a bot to that application called NISS. Obtained a token for the bot so that it could log itself into a server. Saved the token into a local work environment. And thus, coding began. Established a simple bot using a client. Divided into multiple parts into multiple folders which contains the all the commands for the bot. Event folder contains both guild and client(for test running). Made a command that gets user's commands if it starts with a prefix "-". Moved onto event handler and command handler.

  • If a command is given and valid, it will check which command given by the user and will execute it inside the command folder, if command requires more arguments (keywords) then the additional arguments will be passed to the command functions
  • Each command was worked on inside the command folder

Challenges we ran into

Managing permissions, bot requires proper server permission even if the code works. Could not get the dictionary definition function to work because it requires a dictionary API. Due to time constraints and general lack of knowledge of APIs, we could not get this function to work. Most team members don't know how to code :( Hard carried by one certain member.

Accomplishments that we're proud of

Auto detecting user's messages and language and having it auto translate into selected language by the user. Getting the top hit images from google search. First timer programmer implemented music pause/resume. Using a language(JavaScript) that is not the team's strongest language.

What we learned

Coding is hard.(for some people) Learnt how a bot is hosted on a discord server. How each message/command is handled and arguments were passed to the command functions. How to get a definition from the urban dictionary using an API and keywords. How to get a basic discord bot up and running. Learnt how to use GitHub, Visual Studio Code, node.js.

What's next for NISS bot - Discord translator bot

Implement dictionary definition command. Implement weather command for local weather.

Built With

Share this project:

Updates