Displaying Discord Messages In-Game With HTTP GET?

I’m just wondering if this would even be possible in-game, assuming I filter all the messages before displaying them?

If so, how would I go about this? Would I have to create a bot using Discord Developer Portal?

3 Likes

This is possible! Although I’m not sure how this applies to Discord’s TOS as they have strict rules about this kind of stuff. Give it a read just to be sure.


But who cares about the legal stuff here’s how you do it:

  1. Create a Discord Bot! Yes you do need this to interact with the Discord API. While I suppose you could technically just directly connect a Roblox script to the Discord API, I would use a separate web app that is specifically watching the Discord Chat.
  2. Now use that Discord bot and store the chat messages as well as the message ID for later.
  3. From in game, periodically send GET requests to the web app and collect all of the messages passed the last gotten ID. (i.e. if the script last got the message with the ID of 1 then get everything passed that and store the most recent message’s ID)
  4. Filter and display all of the messages in game and just wait for the next time you send the request.
1 Like

Thanks!

I just read there Discord Developer TOS. (A surprisingly quick/easy read.)

image

Regarding this name section, is that referring to my game’s name, my IRL name, my bot’s name, the project name, or?

This is actually just the name of your Application. This will only be shown to you and your team members. You should put whatever you want but I usually use my bot’s name. The game dev alert is just because if you want to add customized functionality to your game regarding RichPresence, you need to apply. This does not apply for your use case.

Thanks for all your help! I have another question, but I’ll be creating a new post to not get too off-topic. I don’t know if you’d be able to help, but it’d be nice if you could check it out. If you don’t, thanks anyway.

I warn you, if it’s about the Discord API, you may find some criticism as many people here will not be too happy if you post non-Roblox related questions.

I will definitely check it out, and hopefully can answer your question!