twitter2telegram/plugins/update.py
2023-05-24 23:20:21 +08:00

22 lines
568 B
Python

from pyrogram.types import Message
from defs.glover import owner
from init import bot
from scheduler import scheduler
from pyrogram import filters
from defs.update import check_update
@bot.on_message(filters=filters.command("check_update") & filters.user(owner))
async def update_all(_, message: Message):
msg = await message.reply("开始检查更新!")
await check_update()
await msg.edit("检查更新完毕!")
# @scheduler.scheduled_job("cron", minute="*/30", id="update_all")
# async def update_all_30_minutes():
# await check_update()