-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add moderation commands #46
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
base: master
Are you sure you want to change the base?
Conversation
returns the first element in the iterable that meets
all the traits passed in attrs.
|
This will close #6 when merged! |
Changes timeout command from individual to a group command and add timeout disable function
… moderation roles
…by passing no role in the config command
…docstrings to explain the parameters
…nition of the function
…onous and remove unnecessary import This commit adds docstrings to some of the functions and removes asynchronous function definition from the `higher_role_check` function as it was redundant to do so and also it removes some of the unnecessary imports in the file
This commit removes asynchronous function definition from `role_check` and `has_permissions` function as they are unnecessary and no async/await was found in the function making it redundant.
…bot.core.plugins.Admin.admin`
…ebot.core.utils.errors`
CaffeineDuck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added some suggestions and some questions in the code changes, hoping for your explanation or code changes soon. @thenishantsapkota
| @lightbulb.command("enable", "Timeout a member from the server") | ||
| @lightbulb.implements(lightbulb.SlashSubCommand, lightbulb.PrefixSubCommand) | ||
| @moderation_role_check | ||
| async def timeout_enable_command(ctx: lightbulb.Context) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is clean even though it's multiline, it's uses helper and reusable functions so it's good.
But you aren't leaving any spacing at all, It'd be better if you leave spaced after 44 or 46, so that it's clear for the code viewer and the code looks clean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do!
…ikari-lightbulb`
…lightbulb would break it
Also changed the paginator from Lightbulb to Miru
No description provided.