CordIO | Discord Webhook Messaging

CordIO

CordIO makes it easier to send messages (and embeds) to discord channels through webhooks
Notice: this does use HTTP service

So Why Would I use CordIO

Well for a ton of reasons, it could be useful for a discord channel which logs when a player joins / leaves, when a player get’s text censored in chat, when an admin does something, or when an anticheat needs a human admin to make sure someone isn’t hacking.

So how do I use CordIO

CordIO is very simple to use. There is more detailed documentation in the About script and in each modulescript, but as a quick over view.

The EndpointClass module script contains a class that has two essential methods for using this
module:postString(useableString) and module:postEmbed(useableEmbed), each of them post a message through the webhook but postString only handles strings while postEmbed accepts a embed object, which I will not be covering here, but there is more documentation in the EmbedClass modulescript. To create a Endpoint object just do module.new(webhookUrl) because this object contains the webhookUrl never replicate this to the client as a hacker could send any information through the link.

Where can I get CordIO

https://www.roblox.com/library/5231941837/CordIO here!

Extras

This was created by DevTops.
If you experience any bugs dm DevTops#9999 on Discord.
I know this was short but so is the functionality, it can be useful, but it’s only around 150 lines of code.
Edit: If you’re going to comment about how discord isn’t a logging service, please don’t comment. I released this for free for everyone to use, just because you cannot find a use for it, does not mean anyone can’t.

4 Likes

Using Discord for this kind of logging is a bad idea. Discord is not a logging service, and you can get your webhook removed or even get banned if you abuse the API like that. This is especially true with something like text getting censored, since that makes it very easy for a malicious actor to try and get your Discord account banned.

11 Likes

True, but there could be other uses, such as when an admin buys something, or a user buys a gamepass or devproduct, that way if they didn’t get their product there would be proof of purchase.

No. Discord is not a logging service please don’t abuse their webhooks to log info like this there is plenty of other alternatives you can get if you look around a bit.

1 Like

Well, yes and no, on an article written by a discord staff member https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks, they give the example of logging github activity.

Sure having some announcement page for GitHub changes is fine. But if you’re gonna have 100s of requests a day to log gamepass purchase it turns to abuse very quickly.

1 Like

Big githubs can have tons of pull requests, commits, pushes, etc per hour.

I would recommend using Slack over Discord for logging your game(s). Discord is not meant to be a logging service for games. Your Discord server(s) is/are at risk for deletion if you use it/them for this purpose. Especially if you are sending a large number of requests/messages.

1 Like

You could probably use Discord for “logging” if your game is private and you just want to chat with friends (or something along those lines, don’t know), however you should not use Discord for public games that people actually play, since Discord is designed specifically for messaging/socialising.

For Europeans I am pretty sure this will technically go against GDPR Regulations since your storing data without the players consent.

Although the release is good-natured, I believe it is a bad idea to provide this sort of library to others who may unknowingly use it for purposes which are against Discord TOS, as Discord is NOT a logging service, nor should it be treated as one. They’ve already banned the Roblox useragent a few years ago due to similar abuse originating from Roblox, don’t let it happen again. This is putting unknowing developers and their servers at risk, and is ultimately risking the privilege for everyone on the Roblox platform.

1 Like

Discord probably cares more about how frequent you are sending webhook requests rather than whether you are using it for logging or not. Discord did not ban Roblox because they were logging, but because they were sending too many requests too quickly. It just happened to be about logging.

However, Discord does not recommend hard coding any limit for sending requests. Instead, you should react to the response headers, and adapt your requests. The response contains useful information about the limit. This way of limiting requests is due to Discord’s dynamic rate limiting, which could change at any time.

You can find more information in their API for rate limits: Discord Developer Portal

Even then, this module:

  1. Does not respect rate limiting, and
  2. May very well be used by unknowing developers for the purposes exampled by the creator which can easily be abused by a malicious actor (e.g. tracking joins/leaves or providing an “Admin Call” button in-game).

Do not abuse the discord webhooks if you have a really popular game, Discord only allows around 10,000 webhook messages per 10 minutes, so if you are having lots of people in your game , your gonna get banned from discord!

For the record, it is not the responsibility of the module creator to respect rate limiting if it simply only gives request bindings, and does not have a working webhook system of its own. The user that manages the request has the responsibility.

The issue here was that OP suggested a bad case for webhooks, unless it is correctly managed.

I don’t think that using Discord as a logging service would really be the best idea. This is probably because the use of Discord for error monitoring is prohibited, and may result in termination.

Use something like trello for this. Discord is not a logging service and they’re VERY strict on their API policy. It’s very easy to create a list for each individual thing you want on one board and add a card for each event.

Thank you for being the first person to point this out.