2023-06-23 15:37:55 +00:00
|
|
|
import asyncio
|
|
|
|
|
2022-10-06 07:40:03 +00:00
|
|
|
from pyrogram import idle
|
|
|
|
|
2023-06-23 15:37:55 +00:00
|
|
|
from init import logs, bot, sqlite
|
2021-11-28 14:55:10 +00:00
|
|
|
|
|
|
|
|
2023-06-23 15:37:55 +00:00
|
|
|
async def main():
|
|
|
|
logs.info("连接服务器中。。。")
|
|
|
|
await bot.start()
|
2022-10-06 07:40:03 +00:00
|
|
|
bot.loop.create_task(sqlite.create_db_and_tables())
|
2023-06-23 15:37:55 +00:00
|
|
|
logs.info(f"@{bot.me.username} 运行成功!")
|
|
|
|
await idle()
|
|
|
|
await bot.stop()
|
2022-10-06 07:40:03 +00:00
|
|
|
sqlite.stop()
|
2023-06-23 15:37:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
asyncio.get_event_loop().run_until_complete(main())
|