Fix a bug
This commit is contained in:
parent
f0f14b9876
commit
0d03a08374
@ -23,7 +23,9 @@ def gen_button(data: Vtuber) -> InlineKeyboardMarkup:
|
|||||||
InlineKeyboardButton(
|
InlineKeyboardButton(
|
||||||
"订阅",
|
"订阅",
|
||||||
url=f"https://t.me/{me.username}?start={data.room_id}"),
|
url=f"https://t.me/{me.username}?start={data.room_id}"),
|
||||||
InlineKeyboardButton("分享", switch_inline_query=data.name), ]
|
InlineKeyboardButton(
|
||||||
|
"分享",
|
||||||
|
url=f"https://t.me/{me.username}?start=info-{data.room_id}"), ]
|
||||||
]
|
]
|
||||||
return InlineKeyboardMarkup(data_)
|
return InlineKeyboardMarkup(data_)
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
from pyrogram import Client, filters
|
from pyrogram import Client, filters
|
||||||
from pyrogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton
|
from pyrogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton
|
||||||
from ci import me
|
from ci import me
|
||||||
|
from plugins.info import info_command
|
||||||
from defs.source import from_name_to_v
|
from defs.source import from_name_to_v
|
||||||
from defs.subs import add_to_subs, remove_from_subs
|
from defs.subs import add_to_subs, remove_from_subs
|
||||||
|
|
||||||
@ -62,6 +63,9 @@ async def start_command(_: Client, message: Message):
|
|||||||
await message.reply(not_sub_msg.format(data.name), quote=True)
|
await message.reply(not_sub_msg.format(data.name), quote=True)
|
||||||
else:
|
else:
|
||||||
await message.reply(not_found_msg.format(name), quote=True)
|
await message.reply(not_found_msg.format(name), quote=True)
|
||||||
|
elif data.startswith("info-"):
|
||||||
|
message.command = ["info", data[5:]]
|
||||||
|
await info_command(_, message)
|
||||||
else:
|
else:
|
||||||
# 订阅
|
# 订阅
|
||||||
name = data
|
name = data
|
||||||
|
Loading…
Reference in New Issue
Block a user