aboutsummaryrefslogtreecommitdiff
path: root/main.py
blob: 693f9d47ae2f6c04cedc45ef3d1295ee72cb4e18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from pyrogram import Client

from commands import handle_commands, load_commands


def update_handler(client, update, users, chats):
    handle_commands(client, update, users, chats)


def main():
    load_commands()
    client = Client(session_name="userbot")
    client.set_update_handler(update_handler)
    client.start()
    client.idle()


if __name__ == '__main__':
    main()