From 3fc8b65fe22eff227af1c00e8c9df38791a8649d Mon Sep 17 00:00:00 2001 From: xtaodada Date: Fri, 25 Mar 2022 00:23:15 +0800 Subject: [PATCH] Fix a bug --- defs/msg.py | 2 +- defs/source.py | 2 +- plugins/info.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/defs/msg.py b/defs/msg.py index 012ce39..c37f638 100644 --- a/defs/msg.py +++ b/defs/msg.py @@ -22,7 +22,7 @@ def gen_button(data: Vtuber) -> InlineKeyboardMarkup: [InlineKeyboardButton("主页", url=data.space_link), 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_) diff --git a/defs/source.py b/defs/source.py index 9cc8d70..52dc3fb 100644 --- a/defs/source.py +++ b/defs/source.py @@ -8,7 +8,7 @@ from json import load from defs.format_time import now_time from defs.utils import Vtuber -vtubers_info: dict[int:Vtuber] = {} +vtubers_info: dict = {} new_vtubers: List[int] = [] old_vtubers: List[int] = [] if exists(f"data{sep}info.json"): diff --git a/plugins/info.py b/plugins/info.py index 8d47f0d..904104b 100644 --- a/plugins/info.py +++ b/plugins/info.py @@ -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") data_ = [[InlineKeyboardButton("详情", url=msg_link), 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_)