mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-06-23 14:16:52 +08:00
@@ -297,7 +297,7 @@ class Bilibililive(StatusChange):
|
|||||||
return None
|
return None
|
||||||
return res_data["data"]["card"]["name"]
|
return res_data["data"]["card"]["name"]
|
||||||
|
|
||||||
def gen_empty_info(self, uid: int) -> Info:
|
def _gen_empty_info(self, uid: int) -> Info:
|
||||||
"""返回一个空的Info,用于该用户没有直播间的情况"""
|
"""返回一个空的Info,用于该用户没有直播间的情况"""
|
||||||
return Bilibililive.Info(
|
return Bilibililive.Info(
|
||||||
title="",
|
title="",
|
||||||
@@ -327,7 +327,7 @@ class Bilibililive(StatusChange):
|
|||||||
|
|
||||||
data = res_dict.get("data")
|
data = res_dict.get("data")
|
||||||
if not data:
|
if not data:
|
||||||
return self.gen_empty_info(uid=int(target))
|
return self._gen_empty_info(uid=int(target))
|
||||||
room_data = data[target]
|
room_data = data[target]
|
||||||
return self.Info.parse_obj(room_data)
|
return self.Info.parse_obj(room_data)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user