Laggrons-Dumb-Cogs
Laggrons-Dumb-Cogs copied to clipboard
[WarnSystem] Use built-in timeouts
Type of feature request
API functionality, Command
The cog your feature request is for.
WarnSystem
Description of the feature you're suggesting
Hehe I like those templates.
Discord released built-in timeouts, muting the member on the whole server. This has a lot of great points, like a more friendly UI while timed out, a built-in interface for muting and selecting the duration, and a countdown until the end of the timeout.
This does present a few limitations compared to manual role mute:
- A mute cannot be permanent, it must have a duration
- Maximum duration is ~~a week~~ 28 days
- Can't customize permissions, like letting the muted members in a special channel (but that's not my concern here)
- Cannot detect a manual timeout
The last point is pretty annoying, it's technically possible to know when a member is timed out (or gets it removed), but discord.py doesn't support that new key. And no, patching discord.py on runtime on a Redbot cog is a VERY bad idea. So, WarnSystem won't be able to log or clear a timeout done manually until Red provides their new library.
Given then limitations, I will probably make all mute-related commands hidden, add a toggle, and make the built-in timeout the default action.
Anything else?
No response
I think an additional useful functionality would be clearing the lasts few messages. Similar to the softban.
I think an additional useful functionality would be clearing the lasts few messages. Similar to the softban.
Getting a user's last messages is hard. Unlike Discord which has all the tables, a bot has to fetch messages in all channels to find them back (unless you have a very large cache), and that operation doesn't scale well at all on servers with a large number of channels.
And to come back to the original issue, I'm waiting for the dpy update with timeout support. I could do manual API calls, but it's almost impossible to catch a manual timeout, so I'd rather wait for the proper implementation to arrive.
Getting a user's last messages is hard. Unlike Discord which has all the tables, a bot has to fetch messages in all channels to find them back (unless you have a very large cache), and that operation doesn't scale well at all on servers with a large number of channels.
My bad forgot about this issue for finding the users last messages.
And to come back to the original issue, I'm waiting for the dpy update with timeout support. I could do manual API calls, but it's almost impossible to catch a manual timeout, so I'd rather wait for the proper implementation to arrive.
That won't happen. Discord.py was abended.
You have to use custom API calls or wait for Redbot to adopt to a new python Discord library or creating/using a fork.
I'm aware of that, and yes, I'm waiting for Red to create its fork.
@laggron42 This issue can be linked to #217