mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-08 02:12:32 -05:00
[RedTree] add UserFeedbackCheckFailure for app_commands (#6397)
Co-authored-by: Jakub Kuczys <me@jacken.men>
This commit is contained in:
@@ -17,6 +17,7 @@ from .app_commands import (
|
||||
Group,
|
||||
NoPrivateMessage,
|
||||
TransformerError,
|
||||
UserFeedbackCheckFailure,
|
||||
)
|
||||
from .i18n import Translator
|
||||
from .utils.chat_formatting import humanize_list, inline
|
||||
@@ -327,6 +328,9 @@ class RedTree(CommandTree):
|
||||
relative_time=relative_time
|
||||
)
|
||||
await self._send_from_interaction(interaction, msg, delete_after=error.retry_after)
|
||||
elif isinstance(error, UserFeedbackCheckFailure):
|
||||
if error.message:
|
||||
await self._send_from_interaction(interaction, error.message)
|
||||
elif isinstance(error, CheckFailure):
|
||||
await self._send_from_interaction(
|
||||
interaction, _("You are not permitted to use this command.")
|
||||
|
||||
Reference in New Issue
Block a user