Fix a bug

This commit is contained in:
xtaodada 2022-03-25 00:23:15 +08:00
parent d89de2e1af
commit 3fc8b65fe2
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
3 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ def gen_button(data: Vtuber) -> InlineKeyboardMarkup:
[InlineKeyboardButton("主页", url=data.space_link), [InlineKeyboardButton("主页", url=data.space_link),
InlineKeyboardButton( InlineKeyboardButton(
"订阅", "订阅",
url=f"https://t.me/{me.username}?start={data.mid}"), ] url=f"https://t.me/{me.username}?start={data.room_id}"), ]
] ]
return InlineKeyboardMarkup(data_) return InlineKeyboardMarkup(data_)

View File

@ -8,7 +8,7 @@ from json import load
from defs.format_time import now_time from defs.format_time import now_time
from defs.utils import Vtuber from defs.utils import Vtuber
vtubers_info: dict[int:Vtuber] = {} vtubers_info: dict = {}
new_vtubers: List[int] = [] new_vtubers: List[int] = []
old_vtubers: List[int] = [] old_vtubers: List[int] = []
if exists(f"data{sep}info.json"): if exists(f"data{sep}info.json"):

View File

@ -29,7 +29,7 @@ def gen_info_button(data: Vtuber) -> InlineKeyboardMarkup:
msg_link = sqlite.get(str(data.room_id), {}).get("msg_link", "https://t.me/DD_YTbs_Live_Tracker") msg_link = sqlite.get(str(data.room_id), {}).get("msg_link", "https://t.me/DD_YTbs_Live_Tracker")
data_ = [[InlineKeyboardButton("详情", url=msg_link), data_ = [[InlineKeyboardButton("详情", url=msg_link),
InlineKeyboardButton("订阅", InlineKeyboardButton("订阅",
url=f"https://t.me/{me.username}?start={data.mid}"), ]] url=f"https://t.me/{me.username}?start={data.room_id}"), ]]
return InlineKeyboardMarkup(data_) return InlineKeyboardMarkup(data_)