Skip to content

Commit

Permalink
Update bot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kalanakt authored Apr 19, 2023
1 parent 4ef1e1c commit 105b5b9
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,16 @@

logging.getLogger("pyrogram").setLevel(logging.WARNING)

class Bot(Client):

def __init__(self):
super().__init__(
name='All-Url-Uploader',
api_id=Config.API_ID,
api_hash=Config.API_HASH,
bot_token=Config.BOT_TOKEN,
workers=50,
plugins={"root": "plugins"},
sleep_threshold=5,
)
app = Client(
name='All-Url-Uploader',
api_id=Config.API_ID,
api_hash=Config.API_HASH,
bot_token=Config.BOT_TOKEN,
workers=50,
plugins={"root": "plugins"},
sleep_threshold=5,
)

async def start(self):
await super().start()
me = await self.get_me()
logging.info(
f"{me.first_name} with for Pyrogram v{__version__} (Layer {layer}) started on {me.username}.")

async def stop(self, *args):
await super().stop()
logging.info("Bot stopped. Bye.")


app = Bot()
app.run()
# logger.info("Bot Stoped ;)")

0 comments on commit 105b5b9

Please sign in to comment.