WebhookProxy | Discord webhooks go brrrrrrr

How long does it take for those in queue to be sent?

It sends as soon as possible. It may take time if your webhook is ratelimited, though.

Just an error code is not good enough to actually know what the problem is. Please send the response body as well. Use RequestAsync.

How would I use RequestAsync? I’m kind of still learning about webhooks. What response body?

Sorry for the late response-- we might have different time zones.

Also, here’s the button script if it’s useful at all

script.Parent.MouseButton1Click:Connect(function()
	local report = script.Parent.Parent.Parent.TextBox.Text
	
	game.ReplicatedStorage.BugReport:FireServer(report, game.Players.LocalPlayer)
	wait(0.1)
	script.Parent.Parent.Parent.TextBox.Text = "Thank you for submitting your report! You can submit another in 10 seconds."
	wait(3)
	script.Parent.Parent.Parent.Parent.Frame.Visible = false
end)

It works now! Thank you for this new sensational technique.

1 Like

I resetted my whole server and got everything running. It’s also showing as online in ‘pm2 list’. I tried to test it but no message in discord and no error code. Idk if I have to do more stuff that is not mentioned.
I hope I had to put the nginx site stuff in the config file of nginx. Otherwise idk what to do

This is a great replacement for hyra hooks. Thank you!

Hello @lewisakura

Im Using your system a lot for my group, but often webhook does not work and the website prompt this message:

Can you try to check what is happening? and try to prevent it from happening so often?

Thank you!

None of my webhooks are working. Is this an error at your end?

Hi all.

There was an issue with the queue system yesterday which I thought I made a post about, but turns out I didn’t, apologies! Your webhooks should be working fine now if it was using that system. This was due to an in-place operating system upgrade which ended up crashing RabbitMQ, and it took me a little while to realise.

Thank you!

Your webhooks should work fine if you’re not abusing the proxy and you’re not using completely new ones. That message comes up when the proxy is protecting itself from people who are trying to get it banned from Discord, which is a system I had to add a while ago since the first release of this got itself banned within a few days as people decided to be bad actors. There’s no resolution that you or I can do at present (not one that costs me quite a bit of money anyway).

1 Like

Do you know how to implement the queue into @LuaScape 's V3 module? @lewisakura

I’ve tried using the code from here WebhookProxy | Discord webhooks go brrrrrrr - #42 by LewisTehMinerz

Within V3, but CJ’s code does not divide the webhook URL into smaller parts.
I got a group using the proxy, and since I can’t get CJ’s error logging module to support queue, it manages to get the webhook ratelimited.

Also, is there a way I can remove the ratelimit from a webhook, if it calms down on the sending?
Or is that putting it into a perm block?

Summary
--[[WARNING!!! MAKE SURE THIS MODULE IS IN SERVER STORAGE OR SERVER SCRIPT SERVICE]]

-- This module was created by LuaScape (Roblox: Snawrk)
-- Proxy Created By LewisTehMinerz
-- DO NOT Edit the code below unless you know what you're doing!
---------------------------------------------------------------------------------------

local webhookService = {}

local https = game:GetService("HttpService")


function webhookService:createMessage(url, message : string)
	local data = {
		["content"] = message
	}
	local finalData = https:JSONEncode(data)
	local finalUrl = string.gsub(url, "discord.com", "webhook.lewistehminerz.dev")
	local finalBackupUrl = string.gsub(url, "discord.com", "webhook.newstargeted.com")
	local good, bad = pcall(function()
		https:PostAsync(finalUrl, finalData)
	end)
	if good then
		print("Webhook Request Success!")
	else
		print("Webhook Request Failed " .. bad .. " Trying backup URL")
		https:PostAsync(finalBackupUrl, finalData)
		print("Attempted request with backup URL, if webhook does not send then both URLS are down or you have a bad request.")
	end
end


function webhookService:createEmbed(url, title : string, message :string , fields, image)
	local data = {
		['content'] = "",
		['embeds'] = {{
			["image"] = {["url"] = image},
			['title'] = "**"..title.."**",
			['description'] = message,
			['type'] = "rich",
			["color"] = tonumber(0xffffff),
			['fields'] = fields

		},
		},
	}
	local finalData = https:JSONEncode(data)
	local finalUrl = string.gsub(url, "discord.com", "webhook.lewistehminerz.dev")
	local finalBackupUrl = string.gsub(url, "discord.com", "webhook.newstargeted.com")
	
	local good, bad = pcall(function()
		https:PostAsync(finalUrl, finalData)
	end)
	if good then
		print("Webhook Request Success!")
	else
		print("Webhook Request Failed " .. bad .. " Trying backup URL")
		https:PostAsync(finalBackupUrl, finalData)
		print("Attempted request with backup URL, if webhook does not send then both URLS are down or you have a bad request.")
		
	end
end


function webhookService:createAuthorEmbed(url, authorName : string, iconurl, description : string, fields)
	local data = {
		["embeds"] = {{
			["author"] = {
				["name"] = authorName,
				["icon_url"] = iconurl,
			},
			["description"] = description,
			["color"] = tonumber(0xFFFAFA),
			["fields"] = fields
			
			
		}},
	}
	
	local finalData = https:JSONEncode(data)
	local finalUrl = string.gsub(url, "discord.com", "webhook.lewistehminerz.dev")
	local finalBackupUrl = string.gsub(url, "discord.com", "webhook.newstargeted.com")
	
	local good, bad = pcall(function()
		https:PostAsync(finalUrl, finalData)
	end)
	if good then
		print("Webhook Request Success!")
	else
		print("Webhook Request Failed " .. bad .. " Trying backup URL")
		https:PostAsync(finalBackupUrl, finalData)
		print("Attempted request with backup URL, if webhook does not send then both URLS are down or you have a bad request.")
	end
end


return webhookService

Hi all,

I will be changing the domain from webhook.lewistehminerz.dev to webhook.lewisakura.moe. There will be a redirect for a few months (until lewistehminerz.dev expires) but I no longer recommend using the old domain. Please change ASAP.

Thank you!

2 Likes

I got a suggestion for the webhook system. @lewisakura
Maybe have the option to send each rate-limited, blocked and does not exist webhook ID (Not token) to a certain public discord channel, so people can see if their ID is banned or ratelimited.
(Posted once each 12 hour if spam from one ID is posted), that way a webhook URL to post ID’s does not spam discord API :slight_smile:

Attempting to send a message when banned will return the ban reason already. Publicly revealing ban logs would be a privacy risk since it discloses who uses the service indirectly (with a bit of looking up you can find where a webhook belongs) and that’s not something I wish to do. If you want to work out why your webhooks are banned, you can work it out yourself by attempting a request.

Is there a way to run embeds through a queue to discord? @lewisakura

Nvm, I edited the script and made a queue work alongside my remote ban for Roblox.

PS: Script requires a discord webhook URL to report, and will error without one.

Solved:
Mas-Remote-ban (serverscriptservice).rbxm (6.7 KB)

hey @lewisakura!
we’re experiencing an issue where a large number of POST requests are getting completely eaten and never get sent to our webhook. originally we figured it was just the rate limiting but it’s chewing up more and more requests, never puts them in a queue to send or anything.
anything you can do or suggestions you got?

oops, we seemed to still be running hyra. that mightve been why.

EDIT: sending POST requests to the proxy is resulting in a 403 forbidden. guess well return to hyra AH anti-abuse is on. thats why. sorry lol

anyway. didnt someone earlier in this thread post a method that uses this proxy as its main, but when it failed, automatically switch to hyra as a backup?
i cant seem to find that post. does… anyone have it, if it even existed?
if not and it was deleted or this is a false memory, does anyone have an example of a script doing this so we can have a proxy when this one goes down?

Something like this?

local HttpService = game:GetService("HttpService")

local function sendHook (hook, username, content)
  local providers = {
    "https://hooks.hyra.io",
    "https://webhook.lewisakura.moe",
  }
  for i = 1, #providers do
    local suc, err = pcall(function ()
      local data = {
        ["username"] = username,
        ["content"] = content,
      }
      HttpService:PostAsync(providers[i] .. hook, HttpService:JSONEncode(data), Enum.HttpContentType.ApplicationJson)
    end)
    if suc then return true end -- sent with success
    if i == #providers then warn("Error all providers failed") return false end
  end
end
if sendHook("/api/webhooks/12345/abcdefg", "MyUsername", "This is the content") then
  -- hook sent to one of the listed providers
else
  -- all providers failed
end
2 Likes

Using this, and its returning error 403. I have http requests on, and I have also tried Hyra. Is something going on? I can’t really say if its down or not because I feel like its a problem on my end.

EDIT: nevermind i think today there were some roblox problems

Depending on the time you were using it, it might’ve been under anti-abuse mode, so it wouldn’t be your fault. You can check the website itself to see if it is.

It really is time for me to buy more IP addresses…