randydev commited on
Commit
8543dc1
·
verified ·
1 Parent(s): 41a55d5
Files changed (1) hide show
  1. generator.py +0 -33
generator.py DELETED
@@ -1,33 +0,0 @@
1
- import logging
2
- from pyromod import listen
3
- from pyrogram import Client, idle
4
- from pyrogram import __version__ as pyro
5
- from pyrogram.errors import ApiIdInvalid, ApiIdPublishedFlood, AccessTokenInvalid
6
- from config import *
7
-
8
- logging.basicConfig(
9
- level=logging.WARNING, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
10
- )
11
- logging.getLogger("pyrogram").setLevel(logging.WARNING)
12
-
13
- app = Client(
14
- "stringolds",
15
- api_id=API_ID,
16
- api_hash=API_HASH,
17
- bot_token=BOT_TOKEN,
18
- plugins=dict(root="StringSessionBot"),
19
- )
20
-
21
- if __name__ == "__main__":
22
- try:
23
- app.start()
24
- except (ApiIdInvalid, ApiIdPublishedFlood):
25
- raise Exception("Your API_ID/API_HASH is not valid.")
26
- except AccessTokenInvalid:
27
- raise Exception("Your BOT_TOKEN is not valid.")
28
- uname = app.get_me().username
29
- print(f"@{uname} Started Successfully!")
30
- print(f"Pyrogram Version: {pyro}")
31
- idle()
32
- app.stop()
33
- print("Bot stopped!")