Skip to main content
Version: Latest

Client

Custom Pyrogram client. This object is passed to the main function of the module.

Module/__init__.py
from utils import *

async def main(app: Client, mod: Module):
pass

It contains several useful parameters.


Parameters

  • num (int) - The client number. It can be seen in the logs.
  • logger (logging.Logger) - The client's logger.
    warning

    Do not use this logger for logging in the module! Instead, use mod.logger.

  • bot (pyrogram.Client) - The associated bot.
  • bot_username (str) - The username of the associated bot.