🐛 Fix missing start handlers

This commit is contained in:
xtaodada 2023-12-24 21:53:05 +08:00
parent 949f9eedc9
commit b467408ff9
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
3 changed files with 7 additions and 2 deletions

View File

@ -11,6 +11,7 @@ from telegram import (
InputTextMessageContent, InputTextMessageContent,
InlineQueryResultsButton, InlineQueryResultsButton,
) )
from telegram.ext import filters
from telegram.error import BadRequest from telegram.error import BadRequest
from telegram.helpers import create_deep_linked_url from telegram.helpers import create_deep_linked_url
@ -99,6 +100,7 @@ class CookiesExport(Plugin):
return cookies_list return cookies_list
@handler.command("cookies_export", block=False) @handler.command("cookies_export", block=False)
@handler.command("start", filters=filters.Regex("cookies_export$"), block=False)
async def cookies_export(self, update: "Update", _: "ContextTypes.DEFAULT_TYPE"): async def cookies_export(self, update: "Update", _: "ContextTypes.DEFAULT_TYPE"):
message = update.effective_message message = update.effective_message
user = update.effective_user user = update.effective_user
@ -137,6 +139,7 @@ class CookiesExport(Plugin):
] ]
@handler.command("cookies_import", block=False) @handler.command("cookies_import", block=False)
@handler.command("start", filters=filters.Regex("cookies_import$"), block=False)
async def cookies_import(self, update: "Update", _: "ContextTypes.DEFAULT_TYPE"): async def cookies_import(self, update: "Update", _: "ContextTypes.DEFAULT_TYPE"):
message = update.effective_message message = update.effective_message
user = update.effective_user user = update.effective_user

View File

@ -75,8 +75,9 @@ class PayLogPlugin(Plugin.Conversation):
return "派蒙没有找到您所绑定的账号信息,请先私聊派蒙绑定账号" return "派蒙没有找到您所绑定的账号信息,请先私聊派蒙绑定账号"
@conversation.entry_point @conversation.entry_point
@handler(CommandHandler, command="pay_log_import", filters=filters.ChatType.PRIVATE, block=False) @handler.command(command="pay_log_import", filters=filters.ChatType.PRIVATE, block=False)
@handler(MessageHandler, filters=filters.Regex("^导入充值记录$") & filters.ChatType.PRIVATE, block=False) @handler.message(filters=filters.Regex("^导入充值记录$") & filters.ChatType.PRIVATE, block=False)
@handler.command(command="start", filters=filters.Regex("pay_log_import$"), block=False)
async def command_start(self, update: "Update", _: "ContextTypes.DEFAULT_TYPE") -> int: async def command_start(self, update: "Update", _: "ContextTypes.DEFAULT_TYPE") -> int:
message = update.effective_message message = update.effective_message
user = update.effective_user user = update.effective_user

View File

@ -203,6 +203,7 @@ class WishLogPlugin(Plugin.Conversation):
@handler.command(command="wish_log_import", filters=filters.ChatType.PRIVATE, block=False) @handler.command(command="wish_log_import", filters=filters.ChatType.PRIVATE, block=False)
@handler.command(command="gacha_log_import", filters=filters.ChatType.PRIVATE, block=False) @handler.command(command="gacha_log_import", filters=filters.ChatType.PRIVATE, block=False)
@handler.message(filters=filters.Regex("^导入抽卡记录(.*)") & filters.ChatType.PRIVATE, block=False) @handler.message(filters=filters.Regex("^导入抽卡记录(.*)") & filters.ChatType.PRIVATE, block=False)
@handler.command(command="start", filters=filters.Regex("gacha_log_import$"), block=False)
async def command_start(self, update: "Update", _: "ContextTypes.DEFAULT_TYPE") -> int: async def command_start(self, update: "Update", _: "ContextTypes.DEFAULT_TYPE") -> int:
message = update.effective_message message = update.effective_message
user = update.effective_user user = update.effective_user