feat(bot): ✨ Add support for me in user command arguments.
This commit is contained in:
@@ -44,6 +44,9 @@ class DiscordUserID(converter.Converter):
|
|||||||
"""Converts a URL, ID, or reply into a Discord User ID."""
|
"""Converts a URL, ID, or reply into a Discord User ID."""
|
||||||
|
|
||||||
async def convert(self, ctx: commands.Context, argument: str) -> int:
|
async def convert(self, ctx: commands.Context, argument: str) -> int:
|
||||||
|
if argument.lower() == "me":
|
||||||
|
return ctx.author.id
|
||||||
|
|
||||||
if argument.isdecimal() and len(argument) in range(17, 20):
|
if argument.isdecimal() and len(argument) in range(17, 20):
|
||||||
return int(argument)
|
return int(argument)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user