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

[WarnSystem] Use built-in timeouts #190

Open
laggron42 opened this issue Dec 29, 2021 · 5 comments
Open

[WarnSystem] Use built-in timeouts #190

laggron42 opened this issue Dec 29, 2021 · 5 comments
Labels
Cog: WarnSystem An issue or a PR for the Warnsystem cog Status: Needs testing This needs testing Type: Feature Adds one or more feature to a cog Type: Suggestion Addition idea for a cog Work in progress

Comments

@laggron42
Copy link
Owner

laggron42 commented Dec 29, 2021

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

@laggron42 laggron42 added Type: Suggestion Addition idea for a cog Status: Needs testing This needs testing Cog: WarnSystem An issue or a PR for the Warnsystem cog Type: Feature Adds one or more feature to a cog Work in progress labels Dec 29, 2021
@Luc1412
Copy link

Luc1412 commented Jan 22, 2022

I think an additional useful functionality would be clearing the lasts few messages. Similar to the softban.

@laggron42
Copy link
Owner Author

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.

@Luc1412
Copy link

Luc1412 commented Jan 31, 2022

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.

@laggron42
Copy link
Owner Author

I'm aware of that, and yes, I'm waiting for Red to create its fork.

@Luc1412
Copy link

Luc1412 commented Apr 4, 2024

@laggron42 This issue can be linked to #217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cog: WarnSystem An issue or a PR for the Warnsystem cog Status: Needs testing This needs testing Type: Feature Adds one or more feature to a cog Type: Suggestion Addition idea for a cog Work in progress
Projects
None yet
Development

No branches or pull requests

2 participants