Discord Bot and a website communication, what should be the system design

I'm building a website that lets users add new items in their profiles. Users can also do the same using Discord bot's commands. In both cases the Discord bot sends a message New item added by @user in a certain channel. I'm thinking of how to design the application. Should I have the POST addItem endpoint on the website's server which the bot would call? onNewDiscordMessage(): if (addItemCommand): sendPostRequest(websiteUrl, data) sendMessageInChannel("New item added!") But then the website would also need to have the message be sent in the Discord channel. Should I make the Discord bot a web app too? Have the bot be imported as a dependency and be manageable using POST endpoint? POST("send_discord_message") void sendMessage(String message) Or should I use RabbitMQ/Kafka queues for this? Or websockets/webhooks?

Mar 9, 2025 - 18:25
 0
Discord Bot and a website communication, what should be the system design

I'm building a website that lets users add new items in their profiles. Users can also do the same using Discord bot's commands. In both cases the Discord bot sends a message New item added by @user in a certain channel.

I'm thinking of how to design the application. Should I have the POST addItem endpoint on the website's server which the bot would call?

onNewDiscordMessage():
  if (addItemCommand):
    sendPostRequest(websiteUrl, data)
  sendMessageInChannel("New item added!")

But then the website would also need to have the message be sent in the Discord channel. Should I make the Discord bot a web app too? Have the bot be imported as a dependency and be manageable using POST endpoint?

POST("send_discord_message")
void sendMessage(String message)

Or should I use RabbitMQ/Kafka queues for this? Or websockets/webhooks?