mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-07-15 20:53:00 +08:00
👌 添加下划线以表示函数私有
Co-authored-by: felinae98 <731499577@qq.com>
This commit is contained in:
parent
4f7a3ebfbe
commit
7c62d218c0
@ -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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user