Skip to content

Commit

Permalink
chore: Merge pull request #859 from TZFC/dev
Browse files Browse the repository at this point in the history
禁言用户新增的参数,添加默认数值,以方便旧版本适配
  • Loading branch information
Nemo2011 authored Dec 7, 2024
2 parents 663102f + 213291d commit eeb67e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bilibili_api/live.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ async def get_room_play_info_v2(
await Api(**api, credential=self.credential).update_params(**params).result
)

async def ban_user(self, uid: int, hour: int) -> dict:
async def ban_user(self, uid: int, hour: int = -1) -> dict:
"""
封禁用户
Expand Down Expand Up @@ -508,6 +508,7 @@ async def unban_user(self, uid: int) -> dict:
data = {
"room_id": self.room_display_id,
"tuid": uid,
"visit_id": "",
}
return await Api(**api, credential=self.credential).update_data(**data).result

Expand Down

0 comments on commit eeb67e8

Please sign in to comment.