Skip to content

Commit

Permalink
chore: Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo2011 committed Aug 26, 2024
2 parents f924fec + e8c2ba5 commit 21054ac
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bilibili_api/live.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ async def start(self, area_id: int) -> dict:
"area_v2": area_id,
"room_id": self.room_display_id,
"platform": "pc",
"csrf": self.credential.bili_jct,
"csrf_token": self.credential.bili_jct
}
resp = (
await Api(**api, credential=self.credential).update_data(**data).result
Expand Down Expand Up @@ -507,7 +509,7 @@ async def unban_user(self, uid: int) -> dict:
}
return await Api(**api, credential=self.credential).update_data(**data).result

async def send_danmaku(self, danmaku: Danmaku, reply_mid: int = None) -> dict:
async def send_danmaku(self, danmaku: Danmaku, room_id: int = None, reply_mid: int = None) -> dict:
"""
直播间发送弹幕
Expand All @@ -522,7 +524,8 @@ async def send_danmaku(self, danmaku: Danmaku, reply_mid: int = None) -> dict:
self.credential.raise_for_no_sessdata()

api = API["operate"]["send_danmaku"]
room_id = (await self.get_room_play_info())["room_id"]
if not room_id:
room_id = (await self.get_room_play_info())["room_id"]

data = {
"mode": danmaku.mode,
Expand Down

0 comments on commit 21054ac

Please sign in to comment.