Discord Chat Logging (With Bots Reduced Ban Risk)

Discord Chat Logging (Using Bots)

The issue with a lot of Discord chat logging you see on the Developer Forum is they mostly use webhooks to send the messages to Discord which is a big nono and could get your Discord account banned, but using Discord bots won’t (According to the Discord Policy). So here is a simple Roblox and Python script to send messages to Discord via bots from Roblox.

Note: Make sure to create a discord bot and have a vps(Get 100 dollars in free digitalocean credit with this link), or a replit account, or an open port to be able to host the server.

Server Installation

On your host of choice download the code via git

git clone https://github.com/Redon-Tech/Discord-Logging-System-Chat-Version-

Or download the zip.
Run on Repl.it
Once you have done that create a .env file with the following info

token=[your bot token]

Then run the python file and boom your server is online.

Note: Make sure you have quart and discord.py installed

pip install quart discord.py

Roblox Installation

Download the .lua or .rbxlx file from Releases · Redon-Tech/Discord-Logging-System-Chat-Version- · GitHub
After you have done that insert the script into ServerScriptStorage then go into the script and on line 22 you will need to change

local URL = "yoursitehere"

to your site URL/IP and make sure HTTP service is enabled.
That’s all!

Edit: Make sure to up the amount of time it will send messages so you don’t end up over-using the Discord bot rate limit. (Learn more: Discord Developer Portal)

Credits

Credit to the original creator of the Roblox script: [ OPEN SOURCED ] Simple Message logging!
Credit to creators of all python scripts used.

Need Help

  • Join the Redon Tech Discord Server and open a ticket
  • PM Me on the forum(Slow response time)
  • Comment on the topic(Slow response time)
9 Likes

This is isn’t entirely right. It’s fine if the load is spread across shards and servers but you will still get your bot removed if you’re abusing the API for a single server.

6 Likes

Discord bots actually have a higher ratelimit than webhooks. Bots are generally not meant for automated actions either, while webhooks are.

A better idea would be to store all chats in a string and send it as a single message once the string exceeds 2000 characters (which is the Discord message character limit).

1 Like

There are many great ways of doing this and I could’ve gone more in-depth into it but yes this is true and I recommend doing this. I personally would just make a website with quart or flask and not use Discord at all sense you control it and not Discord.

Do you have a reference for this? Just wondering so that way I can find any other things that my personal bots could be doing against TOS. I refer to the Discord Developer Portal and as far as I can tell from there it’s not against their terms.
Edit: Sorry for replying 4 days later when I originally read your comment I couldnt actually process it…

The easiest solution to this is just to up the time on when it sends messages, the more complicated way as I said above is just to make your own website with Flask/Quart/Express(Whatever backend you prefer) and just run everything there. I will update the post to let people know not go over the rate limit, thanks for the quick response.

Update

Hello, I did an update recently to fix an issue where colons in the message would split it into multiple messages.