mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-08 04:43:00 +08:00
auto fix by pre-commit hooks
This commit is contained in:
parent
aa29c57d05
commit
3204e84346
@ -145,6 +145,7 @@ class Bilibili(NewMessage):
|
|||||||
raise CategoryNotSupport(post_type)
|
raise CategoryNotSupport(post_type)
|
||||||
return Post("bilibili", text=text, url=url, pics=pic, target_name=target_name)
|
return Post("bilibili", text=text, url=url, pics=pic, target_name=target_name)
|
||||||
|
|
||||||
|
|
||||||
class Bilibililive(StatusChange):
|
class Bilibililive(StatusChange):
|
||||||
# Author : Sichongzou
|
# Author : Sichongzou
|
||||||
# Date : 2022-5-18 8:54
|
# Date : 2022-5-18 8:54
|
||||||
@ -192,7 +193,10 @@ class Bilibililive(StatusChange):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
def compare_status(self, target: Target, old_status, new_status) -> list[RawPost]:
|
def compare_status(self, target: Target, old_status, new_status) -> list[RawPost]:
|
||||||
if(new_status["live_state"]!=old_status["live_state"] and new_status["live_state"]==1):
|
if (
|
||||||
|
new_status["live_state"] != old_status["live_state"]
|
||||||
|
and new_status["live_state"] == 1
|
||||||
|
):
|
||||||
return [new_status]
|
return [new_status]
|
||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
@ -202,4 +206,6 @@ class Bilibililive(StatusChange):
|
|||||||
pic = [raw_post["cover"]]
|
pic = [raw_post["cover"]]
|
||||||
target_name = raw_post["uname"]
|
target_name = raw_post["uname"]
|
||||||
text = target_name + "老师的直播 开播啦!小伙伴们请务必速速来围观!"
|
text = target_name + "老师的直播 开播啦!小伙伴们请务必速速来围观!"
|
||||||
return Post("bilibililive", text=text, url=url, pics=pic, target_name=target_name)
|
return Post(
|
||||||
|
"bilibililive", text=text, url=url, pics=pic, target_name=target_name
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user