Skip to content

Commit

Permalink
Update __main__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Badhacker98 authored Nov 14, 2024
1 parent ccbafb8 commit 73471fb
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions Banall/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
from Banall import app, LOG
import asyncio
import importlib

from pyrogram import idle

from Banall import LOG, app
from Banall.modules import ALL_MODULES


async def anony_boot():
try:
await app.start()
except Exception as ex:
LOG.error(ex)
quit(1)

for all_module in ALL_MODULES:
importlib.import_module("Banall.modules." + all_module)

LOG.info(f"@{app.username} Started.")
await idle()


if __name__ == "__main__":
LOG.info("started")
app.run()
asyncio.get_event_loop().run_until_complete(anony_boot())
LOG.info("Stopping Banall Bot...")

0 comments on commit 73471fb

Please sign in to comment.