Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discord Logger #17

Open
Lucke0051 opened this issue Jun 27, 2020 · 5 comments
Open

Discord Logger #17

Lucke0051 opened this issue Jun 27, 2020 · 5 comments

Comments

@Lucke0051
Copy link
Member

I have made an example of how I would want it to work here: https://www.roblox.com/games/5238935539/HD-Admin-Logger
Would be cool to see something similar make its way into V3!

@1ForeverHD
Copy link
Member

Can you provide more details on the specifics of what this does?

@Lucke0051
Copy link
Member Author

Lucke0051 commented Jun 29, 2020

Well all it does is basically log all commands on discord, how I made it was that it took the same string as the chat logs in HD Admin does and just sends it to the Webhook. Though one thing I would like to improve is that if you use multiple commands it adds a field for each command. Instead of sending a message for each command as it currently does.
disc log

(This was Lord's idea, he needed it so I made it for him and then I thought that I could also make a feature request here)

@1ForeverHD
Copy link
Member

Thanks, I definitely see that working and it looks relatively simple to setup. Does discord or roblox limit the amount of requests you can make within a period of time? If a larger game were to enable this feature (such as an admin house with 10,000+ concurrent users), there's potentially going to be over 50,000 requests/minute. I may explore at 'holding' all the logs a user makes within a short time-frame (such as 1-10 seconds), then firing it off together in one-go.

@Lucke0051
Copy link
Member Author

Lucke0051 commented Jun 29, 2020

Discord limits: 30 requests/minute per channel
Roblox limits: 500 http GET/POST requests per minute

Make sure to make an option to set the limits yourself, at max the Roblox limits, though if any other scripts use HttpService you will need to make sure that script also has some room to post.

Grouping commands and maybe only sending one large message every 30 seconds might be a good idea.
Though Discord embeds can have up to 25 fields, so you might want to send every 25 commands as long as it doesn't step over the limit. If it does then maybe cache it and wait until you can send more. Or for constantly actvie games a last alernative might be to just send them in plain text.

And here is a good guide on Discord webhooks: https://birdie0.github.io/discord-webhooks-guide/structure/embeds.html

@1ForeverHD
Copy link
Member

That helps a lot, thanks! I'll see what I can come up with using that baseline - I'll look at returning to the issue once the LogService is fully setup.

@1ForeverHD 1ForeverHD added this to the V3 milestone Jun 29, 2020
@1ForeverHD 1ForeverHD changed the title HD Admin Discord Logger Discord Logger Jan 2, 2021
@1ForeverHD 1ForeverHD added this to Suggestions/Bugs/Questions in Nanoblox v1.0.0 Feb 2, 2021
@1ForeverHD 1ForeverHD removed this from the Old milestone Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Nanoblox v1.0.0
  
To-consider
Development

No branches or pull requests

2 participants