-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ccbafb8
commit 73471fb
Showing
1 changed file
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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...") |