webhooks only cans send messages and nothing else.
Webhooks can only send messages, If you want this editing messages feature you need to use bots instead.
sorry. I thought you meant players messages in discord
Why am I getting Bad Request (400)
My comment with my code is above by the way!
Embeds needs to be an array of embeds, right now its just an embed dict.
How to change it into an array exactly? (forgot lol)
You would just put the embed data inside another table, and HTTPService
would transform it into a json array.
local MessageData = {
['content'] = "-",
['embeds'] = {
{
['title'] = Title,
['description'] = Desc,
['color'] = 5793266,
["footer"] = {
--["icon_url"] = "https://t7.rbxcdn.com/860f4bd39be19546ce3cf0bfd6b1c4b0", -- optional
["text"] = "Music System"
}
}
}
i cant post a request to the server, it just yields the script forever, great project though.
Great service, no complaints.
For clarification purposes, when you refer to “30 requests per minute,” you do mean 30 requests to the webhook url and not 30 requests per minute for each game server, correct?
If so, it would be incredibly useful to add an option to the api where you can first check how many requests you have remaining before sending the webhook request.
30 Requests to the Webhook URL.
Remaining requests can be found in headers, please see:
Thank you for your response, and clarification.
I am aware of the headers you reffered to.
However, the issue with this is that to see your remaining ratelimit, you must first send a request, which takes up one of your rate limits for that webhook url.
So, for example, if there are multiple game server instances, lets say 30, and they each send a request per minute. If a new gameserver instance gets created, that server now has no information about the current remaining ratelimit and overflow the ratelimit trying to find out how much is remaining. This example is of course sugarcoated, as things can get very hectic with more information being transferred and even more game servers being open. Considering that there are places being blacklisted from sending too many requests, this is a big problem with the api.
Developers are unable (or it would be extremely and unnecessarily tedious using MSS or other methods) to send cross-server information to keep the webhook ratelimit unflooded and all servers updated about the limit.
That is why i suggested an option to check the remaining requests in the api without sending a webhook, so that developers could easily fluctuate within the allocated pool size without unnecessarily complicated cross-server data sharing.
Of course the best solution would be that the api allocates a pool for you, but that would just be too much to ask, and I think what I’ve suggested would be the best compromise to ease integration with your api.
If you need me to clarify anything ive talked about here, please do let me know.
In theory, theres no real way of knowing. OP can simply put a hook and body logger with nobody finding out. Its much more secure to just host your own.
(plus, you wont get this useless ratelimit if you host your own)
The ratelimit is not “useless.” Its the only thing thats in the way of you and discord banning your account for violating their developer terms.
Ratelimits are there for a reason, roblox has been blacklisted for a reason. These services exist for a reason. Calling them “useless” is pretty ignorant.
iirc this entire service is open source as well.
Discord has their own ratelimits. Its hard to hit them.
Plus, all of this talk of getting banned from webhooks is bullshit. From the tens of apps I run with a few requests a second to my webhook for a few months, nothing happened. There are Discord ratelimits for a reason.
This doesnt change anything? Just because its OSC doesnt mean that OP can just edit the code before publishing it to his servers?
If I recall correctly, the official Discord ratelimit is 50 per second. This renders this proxy’s ratelimit completely useless. Only use of this ratelimit is to help upkeep OP’s servers, which is another reason to just host your own.
Update: I have not implemented this yet and don’t feel like doing so.
I hope you realize that the headers and response codes passed through the post request are generated by discord itself and not arbitrary numbers by the developer of this service to upkeep the FREE service he’s providing. Please do some research before responding to what I’ve said.
How come when I use webhooks myself, theres nearly zero ratelimits?
There are rate limits.
The rate limit is exactly what I set on the proxy - I do not add any additional rate limiting, please refer to the Discord Developer Documentation.
The rate limit currently returned by Discord is 5 requests per every 2 seconds, with a global cap of 30 messages per minute per channel.