mirror of
https://github.com/Xtao-Labs/twitter2telegram.git
synced 2024-11-28 02:41:37 +00:00
22 lines
562 B
Python
22 lines
562 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="*/15", id="update_all")
|
|
async def update_all_30_minutes():
|
|
await check_update()
|