Roblox Discord Webhook Proxy Server

Discord no longer bans webhooks coming from Roblox. The osyr.is Discord proxy server has shutdown. Please, switch your osyr.is -based URLs to use Discord instead.

121 Likes

How can i send an embed.

1 Like

You know this can and will get your Discord account banned right?

This is awesome! Thank you for sharing!

3 Likes

I remember jakeā€¦

Then I made a new Discord account ā€“ he is scary.

2 Likes

Thanks a lot for this!

1 Like

Thanks for using it! Let me know if you have any issues with the service or thereā€™s any functionality Iā€™m missing.

Pushed an update which will ban webhooks for abusing rate limits.
(You have to send requests very frequently for this to happen)

If you do get banned, just make a new webhook and send less requests. :+1:

5 Likes

I canā€™t thank you enough for this :smile:

1 Like

Thank you so much! I can finally re-add my mod call feature which weā€™ve been needing for a long time. :stuck_out_tongue:

2 Likes

Thanks bud, you saved my business! :slight_smile:

1 Like

New Roblox API provides appropriate information for scripts to abide by Discordā€™s rate limits.
If Discord lifts the Roblox user-agent ban, I will be shutting down this proxy.

In the event of the proxy shutting down, Iā€™ll provide a library for you to use webhooks in your scripts.

2 Likes

I used this before Roblox got banned from Discord

While there are existing Discord libraries, none of them abide by Discordā€™s dynamic rate limits.

You could edit or provide a new script that abide by Discordā€™s dynamic rate limits, if Roblox getā€™s unban from Discord.

I made one pretty similar to yours at around the same time! Itā€™s a bit of a bummer that it wasnā€™t advertised enough.

2 Likes

Running into a problem where embeds arenā€™t being posted when I send to the discord server. They all worked fine until around yesterday.

For example, if I run the following code in the command barā€¦

local HttpService = game:GetService("HttpService")

local suggestion_webhook = "https://discord.osyr.is/api/webhooks/" --removed the ID I used

local options = {}
options.timestamp = "2018-05-14T05:30:08Z"
options.description = "Test"
options.footer = {
    icon_url = "",
    text = "Test"
}
options.author = {
    name = "WrathOfTheElvhen",
    url = "https://www.roblox.com/users/29783818/profile",
    icon_url = game.Players:GetUserThumbnailAsync(
        29783818,
        Enum.ThumbnailType.HeadShot,
        Enum.ThumbnailSize.Size420x420
    )
}

local HookData = {
    ["embed"] = options,
    ["content"] = "Test"
}

HookData = HttpService:JSONEncode(HookData)

HttpService:PostAsync(suggestion_webhook, HookData)

It would only post the following:

image

Running the JSON in the Embed Visualizer works fine, so I have no idea what the problem isā€¦

JSON Encoding
{
  "embed": 
    {
      "footer": {
        "icon_url": "",
        "text": "Test"
      },
      "description": "Test",
      "timestamp": "2018-05-14T05:30:08Z",
      "author": {
        "icon_url": "https://www.roblox.com/headshot-thumbnail/image?userId=29783818&width=420&height=420&format=png",
        "name": "WrathOfTheElvhen",
        "url": "https://www.roblox.com/users/29783818/profile"
      }
    }
  ,
  "content": "Test"
}

Iā€™m pretty sure the rate limits are all good and that you didnā€™t ban anything. I even tested it in other servers and nothingā€¦Do you perhaps have any idea what happened @Osyris?

1 Like

Webhooks are

{ "embeds":[
{ embed content }, { second embed content }
], "content":"Test"}

In your case, just do

local HookData = {
    ["embeds"] = {options},
    ["content"] = "Test"
}
5 Likes

The proxy server just forwards your POST payload to Discord, the only thing I change is your headers (which shouldnā€™t matter).

Seems like something on Discordā€™s end changed. Does @Improper_Usernameā€™s advice fix your problem?

1 Like

Ah, yeah, I see the problem. I was using [ā€œembedsā€] = {options} before, but I changed it because, while trying to find the problem, an embed visualizer stated that it should be ā€œembedā€ not embeds. And when I did that, it would send (just not the embed). Changing it like @Improper_Username suggested still wouldnā€™t work in game, however a POST request using the JSON string I posted above would post just fine. Which I really should have tested first.

What I didnā€™t realize is that problem came about from the function I used to generate the timestamp, and thatā€™s why it never posted. I must have done a bad job debugging it, because I completely missed that was the original problem.

Timestamp function
local function getCurrentTime()
	local currentTime = os.date("!*t")

	local hour = currentTime.hour
	local minute = currentTime.min
	local second = currentTime.sec

	local day = currentTime.day
	local month = currentTime.month
	local year = currentTime.year

	-- ISO8601 support
	if hour <= 10 then
		hour = 0 .. hour
	end
	if minute <= 10 then
		minute = 0 .. minute
	end
	if second <= 10 then
		second = 0 .. second
	end
	if day <= 10 then
		day = 0 .. day
	end
	if month <= 10 then
		month = 0 .. month
	end
	if year <= 10 then
		year = 0 .. year
	end

	return ("%s-%s-%sT%s:%s:%sZ"):format(year, month, day, hour, minute, second)
end

If you look you can probably see the problem. If the day was <= 10, then itā€™d add a leading zero. Well, today is the 10th, so it gave an incorrect timestamp format (ā€œ2018-08-010T00:00:00Zā€) lol.

Sorry for the trouble! And thanks for the help and quick responses @Osyris and @Improper_Username

3 Likes