-
-
Notifications
You must be signed in to change notification settings - Fork 111
Converters
Base class of custom converters that require the ~Context to be passed.
Class that derived this base converter need to have the __call__ to do the conversion. This method should also be a coroutine.
async def __call__()
The base method that should be overrided and will be called on conversion.
Parameters:
- ctx (
~Context): The command invocation context that the argument used in. - arg (
str): The argument that is being converted.
Converts to a ~pyrogram.types.User.
Conversion priority:
- By user id.
- By username.
- By text mention.
async def __call__()
The base method that should be overrided and will be called on conversion.
Parameters:
- ctx (
~Context): The command invocation context that the argument used in. - arg (
str): The argument that is being converted.
Converts to a ~pyrogram.types.ChatMember.
Conversion priority:
- By chat id.
- By chat username (with '@').
- By chat username (without '@').
async def __call__()
The base method that should be overrided and will be called on conversion.
Parameters:
- ctx (
~Context): The command invocation context that the argument used in. - arg (
str): The argument that is being converted.
Converts to a ~pyrogram.types.ChatMember.
Conversion priority:
- By user id.
- By username.
- By text mention.
async def __call__()
The base method that should be overrided and will be called on conversion.
Parameters:
- ctx (
~Context): The command invocation context that the argument used in. - arg (
str): The argument that is being converted.
Wiki of Anjani © Copyright 2021, UserBotIndo