aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/main.py b/main.py
new file mode 100644
index 0000000..693f9d4
--- /dev/null
+++ b/main.py
@@ -0,0 +1,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()