mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-06 03:54:50 +00:00
update
This commit is contained in:
parent
4d604e18e0
commit
204527e5f1
2 changed files with 4 additions and 4 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
import logging
|
||||||
from logging import ERROR, INFO, FileHandler, StreamHandler, basicConfig, getLogger
|
from logging import ERROR, INFO, FileHandler, StreamHandler, basicConfig, getLogger
|
||||||
|
|
||||||
import pyromod.listen
|
import pyromod.listen
|
||||||
|
|
@ -50,6 +51,9 @@ scheduler = AsyncIOScheduler(
|
||||||
jobstores=jobstores,
|
jobstores=jobstores,
|
||||||
timezone=TZ)
|
timezone=TZ)
|
||||||
|
|
||||||
|
logging.info(scheduler.get_jobs())
|
||||||
|
if bool(scheduler.get_jobs()):
|
||||||
|
scheduler.start()
|
||||||
app.start()
|
app.start()
|
||||||
user.start()
|
user.start()
|
||||||
bot = app.get_me()
|
bot = app.get_me()
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ from misskaty import (
|
||||||
HELPABLE,
|
HELPABLE,
|
||||||
UBOT_NAME,
|
UBOT_NAME,
|
||||||
app,
|
app,
|
||||||
scheduler,
|
|
||||||
)
|
)
|
||||||
from misskaty.core.message_utils import *
|
from misskaty.core.message_utils import *
|
||||||
from misskaty.core.decorator.ratelimiter import ratelimiter
|
from misskaty.core.decorator.ratelimiter import ratelimiter
|
||||||
|
|
@ -76,9 +75,6 @@ async def start_bot():
|
||||||
chat_id, message_id = pickle.load(status)
|
chat_id, message_id = pickle.load(status)
|
||||||
os.remove("restart.pickle")
|
os.remove("restart.pickle")
|
||||||
await app.edit_message_text(chat_id=chat_id, message_id=message_id, text="<b>Bot restarted successfully!</b>")
|
await app.edit_message_text(chat_id=chat_id, message_id=message_id, text="<b>Bot restarted successfully!</b>")
|
||||||
LOGGER.info(scheduler.get_jobs())
|
|
||||||
if bool(scheduler.get_jobs()):
|
|
||||||
scheduler.start()
|
|
||||||
asyncio.create_task(auto_clean())
|
asyncio.create_task(auto_clean())
|
||||||
await idle()
|
await idle()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue