Skip to content

Commit

Permalink
only cast uid once
Browse files Browse the repository at this point in the history
  • Loading branch information
TZFC committed Jan 2, 2024
1 parent 4858d2a commit 89b82ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion EventHandler/DANMU_MSG_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async def handle_danmu_msg(event, database, master_config, room_info):
streamer_uid = await room_info['live_room']._LiveRoom__get_ruid()
async with asyncio.TaskGroup() as tg:
# 主播及master指令
if received_uid in {int(room_info['master_credential'].dedeuserid), streamer_uid}:
if received_uid in {room_info['state']['uid'], streamer_uid}:
if "checkin" in text:
info = await room_info['live_room'].get_room_info()
live_status = info['room_info']['live_status']
Expand Down
2 changes: 1 addition & 1 deletion master.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def load_config(room_infos, room_ids):
'master_credential': __credential,
'live_danmaku': LiveDanmaku(__room_id, credential=__credential),
'live_room': LiveRoom(__room_id, credential=__credential),
'state': {'pre-checkin': False}}
'state': {'pre-checkin': False, 'uid': int(__credential.dedeuserid)}}


event_types = {
Expand Down

0 comments on commit 89b82ec

Please sign in to comment.