Skip to content

Conversation

dkay0670
Copy link
Contributor

@dkay0670 dkay0670 commented May 1, 2025

Fix modmail alias command when no aliases defined
Fixes #1285

In hindsight I should have just put this with my other modmail PR

@ajax146 ajax146 requested review from a team, Cpt-Dingus and Lunaberries and removed request for a team May 1, 2025 19:47
Copy link
Contributor

@ajax146 ajax146 left a comment

Choose a reason for hiding this comment

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

Can this be redone to use auxiliary.prepare_deny_embed instead?

@dkay0670 dkay0670 requested review from ajax146 and Copilot May 3, 2025 07:29
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the issue where the modmail alias command fails when no aliases are defined by replacing the basic embed with a denial embed and ensuring a proper response is sent.

  • Replaces auxiliary.generate_basic_embed with auxiliary.prepare_deny_embed for the “no aliases” case
  • Adds an explicit send and return to prevent further command processing
Comments suppressed due to low confidence (1)

techsupport_bot/commands/modmail.py:1378

  • The change replaces generate_basic_embed with prepare_deny_embed to handle the no-aliases case properly. Please ensure that prepare_deny_embed is implemented consistently with similar command failure responses elsewhere in the code.
embed = auxiliary.prepare_deny_embed(message="There are no aliases registered for this guild",)

@ajax146 ajax146 merged commit f0e14b0 into r-Techsupport:main May 4, 2025
14 checks passed
@dkay0670 dkay0670 deleted the fix-modmail-aliases branch May 4, 2025 02: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.

Modmail alias list does not properly return no aliases embed
2 participants