mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-04 09:10:11 +00:00
[commands] Add attr and parameter "argument" to BadInviteArgument
This commit is contained in:
parent
dbb135b81a
commit
3c2cf06e46
@ -663,7 +663,7 @@ class InviteConverter(Converter[discord.Invite]):
|
|||||||
invite = await ctx.bot.fetch_invite(argument)
|
invite = await ctx.bot.fetch_invite(argument)
|
||||||
return invite
|
return invite
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
raise BadInviteArgument() from exc
|
raise BadInviteArgument(argument) from exc
|
||||||
|
|
||||||
|
|
||||||
class GuildConverter(IDConverter[discord.Guild]):
|
class GuildConverter(IDConverter[discord.Guild]):
|
||||||
|
@ -377,8 +377,9 @@ class BadInviteArgument(BadArgument):
|
|||||||
|
|
||||||
.. versionadded:: 1.5
|
.. versionadded:: 1.5
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self, argument):
|
||||||
super().__init__('Invite is invalid or expired.')
|
self.argument = argument
|
||||||
|
super().__init__(f'Invite "{argument}" is invalid or expired.')
|
||||||
|
|
||||||
class EmojiNotFound(BadArgument):
|
class EmojiNotFound(BadArgument):
|
||||||
"""Exception raised when the bot can not find the emoji.
|
"""Exception raised when the bot can not find the emoji.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user