Roblox Discord Webhook Proxy Server

string.format supports padding like this example:

print(string.format("%012i", 300)) --> 000000000300

Flags and Width

Flag Description
- Left-justify the given field width. Right justification is the default (see “width” below).
+ Forces to precede by a + or - sign, even if the number is positive. The default only shows the - sign in front of a negative number.
(space) A blank space is inserted before the value.
# Used with o and x/X, writes a 0 (octal) or 0x/0X (hex) before the values for values other than zero. Used with e/E and f, it forces the written output to contain a decimal point even if no digits would follow. By default, if no digits follow, no decimal point is written. Used with g or G the result is the same as with e or E but trailing zeros are not removed.
0 Left-pads the number with 0s instead of empty spaces (see “width” below).
width Description
(number) Minimum number of characters to return. If the number of characters to be formatted is less than this number, then the result is padded with blank spaces. Otherwise, nothing happens.
1 Like

What is the limit? I got blocked. Oof.

Jeez what are you sending? I find it really hard to reach the limit with good use (never gotten close to it). You should make your system for it more efficient.

I didn’t receive an error about being block???, but my web-hook stopped sending information regarding server information. I ensured that whatever I am receiving on Discord is in a Embed utilizing the fields and wrapped it into a pcall. It doesn’t throw an error but my discord channel isn’t receiving the information.

1 Like

Can you show us your code minus the URL?

I was using a teleporter that would teleport players to my game from someone else’s slightly more popular game, and the teleporter would read back the following:
“(PlayerName) has been teleported to NASCAR '18 from (GameID) at (Time) on (Date)”

Did like 4000 teleports in 2 days

Edit:
My new method is the following scripts:

 -- Teleport Script
function onTouched(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	script.Disabled = true
    if player then
			script.Parent.NumPlayers.Value = script.Parent.NumPlayers.Value + 1
        game:GetService("TeleportService"):Teleport(1917083441,player)
    end

	wait(1)
	script.Disabled = false
end
 
script.Parent.Touched:connect(onTouched)
-- DataPost Script
local http = game:GetService("HttpService")
local playernum = script.Parent.Teleporter.NumPlayers

while true do
wait(300)	
if playernum.Value > 0 then
local date = os.date("!*t")
local Data = {['content'] = tostring(playernum.Value).."players has been teleported to NASCAR '18 from ".. game.PlaceId .. " at " ..date.hour..":"..date.min .. " on " .. date.month.."/"..date.day.."/"..date.year}
		Data = http:JSONEncode(Data)
			http:PostAsync(url, Data)
playernum.Value = 0
end
end

Think that should keep me from hitting the limit.

Yeah the multitude of requests is what exceeded the limit.

1 Like

But do you know what the multitude of requests is? Like I just made a bug logger through the proxy and it got banned with 15 minutes for what seemed like much less things being posted.

1 Like

https://discordapp.com/developers/docs/topics/rate-limits

1 Like

That link explains a rate limit. It doesn’t say what the limit is though.

Rate limits are applied on a per-route basis (meaning they can be different for each route called), with the exception of an additional global rate limit spanning across the entire API.

However from looking around on the Discordapp GitHub I found this:

  1. A global 50/10 rate limit (meaning, this is the maximum # of messages a bot can send currently across all of discord every 10 seconds.)
  2. A 5/5 per server rate limit. (meaning you can carry out 5 actions per every 5 seconds)
  3. A 5/5 global DM rate limit (meaning you can carry out 5 DM actions per every 5 seconds)

The rate limit applies to message creation and editing.

So in this case if you are sending more than 5 messages per 5 seconds I would think about slowing down that rate of sending by using a different approach to whatever you are doing.

2 Likes

I sent 8 across 4 minutes and it banned my webhook. Not to mention, it banned my webhook like 20 minutes after it stopped posting stuff. Idk dood.

I would suggest monitoring your requests being sent in ROBLOX, maybe add a print every time one is sent, to ensure you aren’t sending a mass of them unintentionally. If this guarantees you are not sending too many, you need to contact Osyris, or if they are being blocked on Discord’s side, Discord support.

1 Like

Idk. Kinda considering just trying to slam like 30 seconds of bugs into one post. That’d fix it right cuz I’d only be posting every 30 seconds?

I’m theory yes, may I ask what you are using the webhook for?

My game runs into extremely rare random bugs so as a bug logger.

If I’d like to run my own copy, how do I go about changing ‘https://discord.osyr.is’ to something like ‘https://discord.somethinghere.is

From looking at the source code of the proxy what I’ve found is that Osyris is using an express server to set up routing on his hosting. This basically means that you can set up endpoints at the end of your domain that you can send GET or POST requests to. In this case, he has it set up like so:

"/api/webhooks/:hookId/:hookToken" which is listening for POST requests with the required fields hookId and hookToken in the URL after /api/webhooks/. This means that you could get your own hosting or set it up on Docker as explained in the main post, and use it to send requests.

So considering how the routing is set above, if your web app was located at the web address ‘aspheric.something.com’ you could send POST requests to, for example, http://aspheric.something.com/api/webhooks/1282737272727/162626261616711.

Hope this helped.

3 Likes

A post was merged into an existing topic: Off-topic and bump posts

Just a heads up everyone, this service will be shutting down soon (see below).

Quoting @Osyris off of Discord:

As of recently, Discord no longer bans webhooks coming from Roblox. The osyr.is Discord proxy server will shutdown in one week. Please, switch your osyr.is -based URLs to use Discord instead.

6 Likes