兼容B站弹幕升级(SC日文翻译字段改变)
This commit is contained in:
parent
87651f044c
commit
15669a2084
@ -233,7 +233,7 @@ class SuperChatMessage:
|
|||||||
:param message_jpn: 消息日文翻译(目前只出现在SUPER_CHAT_MESSAGE_JPN)
|
:param message_jpn: 消息日文翻译(目前只出现在SUPER_CHAT_MESSAGE_JPN)
|
||||||
:param start_time: 开始时间戳
|
:param start_time: 开始时间戳
|
||||||
:param end_time: 结束时间戳
|
:param end_time: 结束时间戳
|
||||||
:param time: 持续时间?
|
:param time: 剩余时间
|
||||||
:param id_: str,消息ID,删除时用
|
:param id_: str,消息ID,删除时用
|
||||||
:param gift_id: 礼物ID
|
:param gift_id: 礼物ID
|
||||||
:param gift_name: 礼物名
|
:param gift_name: 礼物名
|
||||||
@ -271,7 +271,7 @@ class SuperChatMessage:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def from_command(cls, data: dict):
|
def from_command(cls, data: dict):
|
||||||
return cls(
|
return cls(
|
||||||
data['price'], data['message'], data['message_jpn'], data['start_time'],
|
data['price'], data['message'], data['message_trans'], data['start_time'],
|
||||||
data['end_time'], data['time'], data['id'], data['gift']['gift_id'],
|
data['end_time'], data['time'], data['id'], data['gift']['gift_id'],
|
||||||
data['gift']['gift_name'], data['uid'], data['user_info']['uname'],
|
data['gift']['gift_name'], data['uid'], data['user_info']['uname'],
|
||||||
data['user_info']['face'], data['user_info']['guard_level'],
|
data['user_info']['face'], data['user_info']['guard_level'],
|
||||||
|
@ -30,9 +30,9 @@ class MyBLiveClient(blivedm.BLiveClient):
|
|||||||
|
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
# 139是黑桐谷歌的直播间
|
# 参数1是直播间ID
|
||||||
# 如果SSL验证失败就把ssl设为False
|
# 如果SSL验证失败就把ssl设为False
|
||||||
client = MyBLiveClient(139, ssl=True)
|
client = MyBLiveClient(14917277, ssl=True)
|
||||||
future = client.start()
|
future = client.start()
|
||||||
try:
|
try:
|
||||||
# 5秒后停止,测试用
|
# 5秒后停止,测试用
|
||||||
|
Loading…
Reference in New Issue
Block a user