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:
@@ -69,6 +69,9 @@ from discord.app_commands import (
|
||||
)
|
||||
|
||||
from . import checks as checks
|
||||
from .errors import (
|
||||
UserFeedbackCheckFailure as UserFeedbackCheckFailure,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
"AllChannels",
|
||||
@@ -131,4 +134,5 @@ __all__ = (
|
||||
"rename",
|
||||
"user_install",
|
||||
"checks",
|
||||
"UserFeedbackCheckFailure",
|
||||
)
|
||||
|
||||
10
redbot/core/app_commands/errors.py
Normal file
10
redbot/core/app_commands/errors.py
Normal file
@@ -0,0 +1,10 @@
|
||||
"""Errors module for the app_commands package."""
|
||||
from discord import app_commands
|
||||
|
||||
|
||||
class UserFeedbackCheckFailure(app_commands.CheckFailure):
|
||||
"""A version of CheckFailure responding with a custom error message."""
|
||||
|
||||
def __init__(self, message=None, *args):
|
||||
self.message = message
|
||||
super().__init__(message, *args)
|
||||
Reference in New Issue
Block a user