Skip to content

Conversation

@thenishantsapkota
Copy link
Contributor

No description provided.

@thenishantsapkota thenishantsapkota marked this pull request as draft January 26, 2022 15:08
@thenishantsapkota
Copy link
Contributor Author

This will close #6 when merged!

@thenishantsapkota thenishantsapkota linked an issue Jan 26, 2022 that may be closed by this pull request
Changes timeout command from individual to a group command and add timeout disable 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.
@thenishantsapkota thenishantsapkota marked this pull request as ready for review January 29, 2022 16:42
Copy link
Contributor

@CaffeineDuck CaffeineDuck left a 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:
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Moderation Commands

3 participants