🐛 Fix missing start handlers

This commit is contained in:
xtaodada 2023-12-24 21:53:05 +08:00
parent 32e24d68a5
commit b1df0fa14d
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 6 additions and 1 deletions

View File

@ -11,6 +11,7 @@ from telegram import (
InputTextMessageContent,
InlineQueryResultsButton,
)
from telegram.ext import filters
from telegram.error import BadRequest
from telegram.helpers import create_deep_linked_url
@ -99,6 +100,7 @@ class CookiesExport(Plugin):
return cookies_list
@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"):
message = update.effective_message
user = update.effective_user
@ -137,6 +139,7 @@ class CookiesExport(Plugin):
]
@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"):
message = update.effective_message
user = update.effective_user

View File

@ -36,6 +36,7 @@ except ImportError:
if TYPE_CHECKING:
from telegram import Update, Message, User, Document
from telegram.ext import ContextTypes
from gram_core.services.players.models import Player
INPUT_URL, INPUT_FILE, CONFIRM_DELETE = range(10100, 10103)
@ -143,7 +144,8 @@ class WishLogPlugin(Plugin.Conversation):
@conversation.entry_point
@handler.command(command="warp_log_import", filters=filters.ChatType.PRIVATE, block=False)
@handler.message(filters=filters.Regex("^导入跃迁记录(.*)") & filters.ChatType.PRIVATE, block=False)
async def command_start(self, update: Update, context: CallbackContext) -> int:
@handler.command(command="start", filters=filters.Regex("gacha_log_import$"), block=False)
async def command_start(self, update: "Update", context: "ContextTypes.DEFAULT_TYPE") -> int:
message = update.effective_message
user = update.effective_user
args = self.get_args(context)