mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-16 04:45:27 +00:00
🐛 Fix issue of incorrect parameters being passed when calling add_delete_message_job
This commit is contained in:
parent
87354ce417
commit
139c6758ae
@ -104,7 +104,7 @@ class PluginFuncs:
|
||||
|
||||
job_queue = self.application.job_queue or context.job_queue
|
||||
|
||||
if job_queue is None:
|
||||
if job_queue is None or chat is None:
|
||||
raise RuntimeError
|
||||
|
||||
return job_queue.run_once(
|
||||
|
@ -142,16 +142,16 @@ class AbyssPlugin(Plugin):
|
||||
reply_message = await message.reply_text(
|
||||
"未查询到您所绑定的账号信息,请先私聊派蒙绑定账号", reply_markup=InlineKeyboardMarkup(buttons)
|
||||
)
|
||||
self.add_delete_message_job(reply_message.chat_id)
|
||||
self.add_delete_message_job(message.chat_id)
|
||||
self.add_delete_message_job(reply_message)
|
||||
self.add_delete_message_job(message)
|
||||
else:
|
||||
await message.reply_text("未查询到您所绑定的账号信息,请先绑定账号", reply_markup=InlineKeyboardMarkup(buttons))
|
||||
return
|
||||
except TooManyRequestPublicCookies:
|
||||
reply_message = await message.reply_text("查询次数太多,请您稍后重试")
|
||||
if filters.ChatType.GROUPS.filter(message):
|
||||
self.add_delete_message_job(reply_message.chat_id)
|
||||
self.add_delete_message_job(message.chat_id)
|
||||
self.add_delete_message_job(reply_message)
|
||||
self.add_delete_message_job(message)
|
||||
return
|
||||
|
||||
async def reply_message_func(content: str) -> None:
|
||||
|
@ -183,5 +183,5 @@ class BirthdayPlugin(Plugin):
|
||||
text = "没有领取到生日画片哦 ~ 可能是已经领取过了"
|
||||
reply_message = await message.reply_text(text)
|
||||
if filters.ChatType.GROUPS.filter(reply_message):
|
||||
self.add_delete_message_job(message.chat_id)
|
||||
self.add_delete_message_job(reply_message.chat_id)
|
||||
self.add_delete_message_job(message)
|
||||
self.add_delete_message_job(reply_message)
|
||||
|
@ -87,7 +87,7 @@ class Sign(Plugin):
|
||||
reply_message = await message.reply_text(msg)
|
||||
if filters.ChatType.GROUPS.filter(message):
|
||||
self.add_delete_message_job(reply_message, delay=30)
|
||||
self.add_delete_message_job(message.chat_id, delay=30)
|
||||
self.add_delete_message_job(message, delay=30)
|
||||
return
|
||||
logger.info("用户 %s[%s] 每日签到命令请求", user.full_name, user.id)
|
||||
if filters.ChatType.GROUPS.filter(message):
|
||||
@ -118,7 +118,7 @@ class Sign(Plugin):
|
||||
)
|
||||
self.add_delete_message_job(reply_message, delay=30)
|
||||
|
||||
self.add_delete_message_job(message.chat_id, delay=30)
|
||||
self.add_delete_message_job(message, delay=30)
|
||||
else:
|
||||
await message.reply_text("未查询到您所绑定的账号信息,请先绑定账号", reply_markup=InlineKeyboardMarkup(buttons))
|
||||
except NeedChallenge as exc:
|
||||
|
@ -241,7 +241,7 @@ class WishSimulatorPlugin(Plugin):
|
||||
reply_message = await message.reply_text("出错了呜呜呜 ~ 卡池部分数据未找到!")
|
||||
if filters.ChatType.GROUPS.filter(message):
|
||||
self.add_delete_message_job(reply_message, name="wish_simulator")
|
||||
self.add_delete_message_job(message.chat_id, name="wish_simulator")
|
||||
self.add_delete_message_job(message, name="wish_simulator")
|
||||
return
|
||||
player_gacha_banner_info = player_gacha_info.get_banner_info(banner)
|
||||
template_data = {
|
||||
|
Loading…
Reference in New Issue
Block a user