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

Updates to Moderation Cog #658

Merged
merged 10 commits into from
Nov 18, 2024
Merged

Updates to Moderation Cog #658

merged 10 commits into from
Nov 18, 2024

Conversation

wlinator
Copy link
Contributor

@wlinator wlinator commented Nov 15, 2024

Fixes #553

This PR fixes several issues, and proposes the removal of the delete_after parameter in all moderation and config commands.

Fixes & improvements:

  • Add ctx.defer() to mod commands that take a while to process, to output "bot is thinking..." while waiting.
  • Add asyncio.gather() to some commands, allowing it to process multiple async actions at the same time.
  • Clean up the jail command, so it no longer violates PLR0911 quality assurance (too many return statements)
  • Update config.py to implement interaction.followup.send instead of interaction.response.send_message
  • Add more logging to the warn command, alongside an async DM attempt which can fail without error.

Remove self-deletion is ephemeral commands:

  • The delete_after parameter is removed in the moderation outputs, they are already ephemeral if used as Slash Command. Additionally, the same counts for output from config.py - they are all exclusively ephemeral interaction commands.

This comment was marked as spam.

sourcery-ai[bot]

This comment was marked as resolved.

@wlinator wlinator changed the title Fix jail and unjail Updates to Moderation Cog Nov 15, 2024
@kzndotsh
Copy link
Contributor

Is this ready for review?

style(moderation): remove underscores from embed field titles for consistency

refactor(moderation): simplify embed description assignment for DM status

chore(moderation): remove commented-out code for cleaner codebase
…bed fields

style(moderation): prefix DM status with '-#' for better visual distinction
@kzndotsh kzndotsh merged commit 303ea38 into main Nov 18, 2024
7 of 8 checks passed
@kzndotsh kzndotsh deleted the tess-jail-fix branch November 18, 2024 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When using jail slash command says interaction failed yet command worked
2 participants