Skip to content

fix(bot): return translated error when moving ticket to a full Discord category#394

Merged
Akinator31 merged 1 commit intomainfrom
389-too-much-channel-in-a-category
Apr 17, 2026
Merged

fix(bot): return translated error when moving ticket to a full Discord category#394
Akinator31 merged 1 commit intomainfrom
389-too-much-channel-in-a-category

Conversation

@Akinator31
Copy link
Copy Markdown
Member

This pull request improves error handling when moving channels to Discord categories that have reached their maximum capacity. It introduces a new error type to represent this situation and ensures that users receive a clear, localized message when the error occurs.

Error handling improvements:

  • Added a new DiscordError::CategoryFull variant to represent the case when a Discord category is full, and updated the error mapping logic in move_thread/common.rs to detect this specific error from Discord API responses.
  • Updated the error message logic so that when CategoryFull occurs, a specific error message is returned instead of a generic Discord API error.

Localization updates:

  • Added user-friendly, localized error messages for the new discord.category_full error in both English and French dictionaries, ensuring users are informed about the reason for the failure and possible next steps.

Integration with move channel logic:

  • Updated the channel moving functions to use the new error mapping, so attempts to move a channel to a full category will properly trigger the new error and message.

@Akinator31 Akinator31 self-assigned this Apr 17, 2026
@Akinator31 Akinator31 linked an issue Apr 17, 2026 that may be closed by this pull request
@Akinator31 Akinator31 merged commit db829e7 into main Apr 17, 2026
2 checks passed
@Akinator31 Akinator31 deleted the 389-too-much-channel-in-a-category branch April 17, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Too much channel in a category

1 participant