Discord Bot API

Vanshika Sabharwal2026-02-19

I got to know about this assignment from a Discord server.

I never worked on the Discord API before and found this quite fascinating.

  1. I started working on this by first checking what the Discord API is and found that it's very interesting.
  2. I created a Typescript-based project and added all the environment variables.
  3. Created a Discord Bot and got the keys.
  4. Wrote a program to ensure the Discord Bot is connected to my server.
  5. I started with a brute approach to by using a database to store the messages and perform search on it provided the word and it's limit.
  6. Then I wrote logic to use slash command in the chat of the server.
  7. Now using the Discord API Link, any admin can use the API in their discord server.

Problems faced:-

  • Could not understand the flow and how to connect the Discord API.
  • Optimizing the logic to get all the messages fetched from Discord API and store them in best way possible in database.
  • Discord API can only look up to 100 messages (latest), acting as a drawback thus further optimization is needed.

Future Plans:-

  • Optimize the database to store messages efficiently.
  • Ensure the Discord Bot has all the permissions and is accessible to large number of people with least complexity.
  • Create an application to help people use these Discord Bots for there Discord server.

You can check out the GitHub repo here: https://github.com/VanshikaSabharwal/Discord-Bot

Key Points

  • Will create an web application to have different types of discord bots for people to access for their discord server.