Discord Integration: A guide on using Discord through Roblox [UPDATED]

Their grievance isn’t obeying or even approaching the rate limit. Their issue is that Roblox HttpService doesn’t return headers, which contain error data, should the POST fail. As Roblox scripts cannot receive Discord API errors correctly, we cannot react to specific errors other than the fact that the POST failed. They said 88% of API calls were invalid, so it’s as if they’re being DDoSed with data they’ll have to reject, explain why they rejected, all for nothing since we don’t receive that data in the first place. Discord may lift this ban if Roblox allows headers to transit.

5 Likes

How would I go about using embeds?

1 Like

You can see the structure of how embeds are supposed to look at https://discordapp.com/developers/docs/resources/channel#embed-object-embed-structure

And how webhook payloads are supposed to look at https://discordapp.com/developers/docs/resources/webhook#execute-webhook-jsonform-params

You can visualize webhooks in your browser on sites like https://leovoel.github.io/embed-visualizer/ (small note that you use "embeds": [{...}] and not "embed": {} for webhook payloads)

3 Likes

I thought Roblox already allowed headers?

That’s sending, not receiving.

2 Likes

this should probably be locked, webhooks being used this way is banned on discord, no exceptions, pass through an api or something, you’re still violating discord’s tos

1 Like

Not entirely inherently. If there was a proxy designed to return the headers in JSON along with the discord API response, that would be in compliance with the Discord ToS.

If you’d refer to the post by @Osyris, he links this tweet from the lead backend developer at Discord:
https://devforum.roblox.com/t/discord-integration-a-guide-on-using-discord-through-roblox-updated/47090/66

3 Likes

I’m so glad somebody made this, I used Discord webhooks all the time before roblox was blacklisted and really missed the functionality - that is until you created this proxy server. I wish I could’ve thanked your earlier! (just got in devforum)

also can i say how smart it is to have the server send a message through your webhook when it gets blacklisted

very intuitive design my dude

3 Likes

Oh you must be talking about the post marked as answer. @Osyris made that, not me. :smiley:

3 Likes

Oh my bad, still learning how this user interface works :joy:

3 Likes

Can someone help me? The proxy wont work for me. When i go to the webhook via the proxy i get Cannot GET /api/webhooks/(my webhook info)

I don’t even remember the context of this post, but shouldn’t the api version be in there

like /api/v6/webhooks/yadayadayada

1 Like

This is currently against ROBLOX ToS. My game was suspended because it had Discord Webhooks.

1 Like

Can you elaborate on how you were using Discord webhooks? Were you showing them to players? Did you send PII / chats of players unfiltered over the webhooks?

6 Likes

It was an application center. Everytime a response was sent, it was posted to a webhook. I guess thats unfiltered over webhooks, but is there a way around it?

What @buildthomas meant is basically:
Did you filter the players’ input (responses / application) before sending to Discord webhook?
See:
https://developer.roblox.com/en-us/articles/Text-and-Chat-Filtering

1 Like

Being a bit skeptical about discord webhooks and its legalities with ROBLOX, I decided to use zapier.com to collect webhooks from ROBLOX, then I would post the webhook from Zapier to Discord.

According to posts above, this would be legal, correct?

If its legal:

Use this (I would suggest pcalling the event, but im not sure if it is useful or not):

local webhook = "webhooklink" --Place link inside quotes

local success, message = pcall(function()	
	HttpService:PostAsync(webhook, "This is a webhook")
end)
  1. First option: Webhooks by Zapier
  2. Trigger Event: Catch Raw Hook (Catch raw body up to 2 MB)
  3. Copy the link and paste the link into the script
  4. Skip test and continue
  5. Second Option: Webhooks by Zapier
  6. Action Event: POST
  7. Paste your discord webhook link into “URL” box
  8. Payload Type “Json”
  9. Data box 1 should have “content”
  10. Data box 2, click “+Insert the field” button and click “Raw Body”. Although it says no data it will contain data whenever zapier is called
  11. Wrap request in array: no
  12. Unflatten: yes
  13. Continue, save without testing, and turn zapier on.
3 Likes

I haven’t gotten any errors with using Discord Webhooks, I’ve used them with anti-exploit logs and a group I worked for (British Army) used them and they have at least a hundred webhooks a day.

1 Like

Yeah, discord has now unblocked them and as long as you are not spamming you should be Ok I think

2 Likes