Discord bots

What's that ?

💬 Discord is a social platform where users can create "servers" — private or community-based forums for managing personal or professional communications.

🤖 Also, Discord allows adding bot users!

This transforms a basic server into a powerful communication and automation tool.

I've developed two bots so far, one of which helps me explore the possibilities offered by the Discord.js framework.

🛠️ My bots can :

  • Intercept messages
  • Update counters
  • Trigger scheduled events
  • Call external APIs
  • Make requests to ChatGPT
  • Access file repositories
  • Send private messages
  • Send voice messages
  • Generate and send images

⬇️ Play with the frameworks and languages by grabbing them with your mouse !

project image 0
project image 1
project image 2

⬅️ Play with the frameworks and languages by grabbing them with your mouse !

Languages

  • Typescript

Frameworks

  • DiscordJS
  • OpenAI SDK
  • AWS SDK

Challenges

⏳ The most complex feature I implemented is a summary tool. It fetches the last x messages from a channel and sends them recursively to ChatGPT for summarization.

🔁 Though unplanned initially, the recursiveness turned out to be the most elegant solution for handling large volumes of messages while respecting the token limit imposed by OpenAI.

Motivations

🚀 Of the two bots I created, one is for professional use and the other for fooling around with friends. At first, I explored bot development out of sheer curiosity.

🧠 But as my friends and I came up with more and more feature ideas, I kept refining my skills. I regularly challenged both Discord.js and myself, ultimately realizing we were rarely limited !

🎯 This project has been both exciting and continuously evolving. The various experiments allowed me to easily build a second bot for a more structured, business-oriented server.

Next steps

🔧 No major updates are planned for now, except for a few tweaks on one of the two bots.

🍃 Moreover, some thought could be given to the choice of AI model and hosting. Generative AIs, including ChatGPT, consume a lot of electricity. I'll probably conduct an audit someday to identify areas for improvement (by choosing a green hosting provider, or by using the French LLM Mistral, mostly powered by green energy, etc.)

📊 That said, based on the testing that happened on my private server, it's clear that Discord has huge potential for communication and efficience for small to medium-sized businesses. It's definitely a strength I could offer to clients or organizations.