mirror of
https://github.com/xfgryujk/blivedm.git
synced 2024-12-26 12:50:13 +08:00
整理已知命令
This commit is contained in:
parent
7a4c039786
commit
4c64c1bd1e
22
blivedm.py
22
blivedm.py
@ -319,21 +319,12 @@ class BLiveClient:
|
||||
SuperChatDeleteMessage.from_command(command['data'])
|
||||
)
|
||||
}
|
||||
for cmd in ( # 其他已知命令
|
||||
'', 'ACTIVITY_BANNER_RED_NOTICE_CLOSE', 'ACTIVITY_BANNER_UPDATE_V2', 'ACTIVITY_MATCH_GIFT',
|
||||
'ACTIVITY_RED_PACKET', 'BLOCK', 'CHANGE_ROOM_INFO', 'CLOSE', 'COMBO_END', 'COMBO_SEND',
|
||||
'CUT_OFF', 'DAILY_QUEST_NEWDAY', 'END', 'ENTRY_EFFECT', 'GUARD_LOTTERY_START',
|
||||
'GUARD_MSG', 'GUIARD_MSG', 'HOUR_RANK_AWARDS', 'LIVE', 'LOL_ACTIVITY',
|
||||
'LUCK_GIFT_AWARD_USER', 'MESSAGEBOX_USER_GAIN_MEDAL', 'new_anchor_reward', 'NOTICE_MSG',
|
||||
'PK_AGAIN', 'PK_END', 'PK_MATCH', 'PK_MIC_END', 'PK_PRE', 'PK_PROCESS', 'PK_SETTLE',
|
||||
'PK_START', 'PREPARING', 'RAFFLE_END', 'RAFFLE_START', 'REFRESH', 'ROOM_ADMINS',
|
||||
'room_admin_entrance', 'ROOM_BLOCK_INTO', 'ROOM_BLOCK_MSG', 'ROOM_BOX_MASTER',
|
||||
'ROOM_CHANGE', 'ROOM_KICKOUT', 'ROOM_LIMIT', 'ROOM_LOCK', 'ROOM_RANK',
|
||||
'ROOM_REAL_TIME_MESSAGE_UPDATE', 'ROOM_REAL_TIME_MESSAGE_UPDATE', 'ROOM_REFRESH',
|
||||
'ROOM_SHIELD', 'ROOM_SILENT_OFF', 'ROOM_SILENT_ON', 'ROOM_SKIN_MSG', 'ROUND',
|
||||
'SCORE_CARD', 'SEND_TOP', 'SPECIAL_GIFT', 'SUPER_CHAT_ENTRANCE',
|
||||
'SUPER_CHAT_MESSAGE_JPN', 'SYS_GIFT', 'SYS_MSG', 'TV_END', 'TV_START', 'USER_TOAST_MSG',
|
||||
'WARNING', 'WEEK_STAR_CLOCK', 'WELCOME', 'WELCOME_GUARD', 'WIN_ACTIVITY', 'WISH_BOTTLE'
|
||||
# 其他常见命令
|
||||
for cmd in (
|
||||
'INTERACT_WORD', 'ROOM_BANNER', 'ROOM_REAL_TIME_MESSAGE_UPDATE', 'NOTICE_MSG', 'COMBO_SEND',
|
||||
'COMBO_END', 'ENTRY_EFFECT', 'WELCOME_GUARD', 'WELCOME', 'ROOM_RANK', 'ACTIVITY_BANNER_UPDATE_V2',
|
||||
'PANEL', 'SUPER_CHAT_MESSAGE_JPN', 'USER_TOAST_MSG', 'ROOM_BLOCK_MSG', 'LIVE', 'PREPARING',
|
||||
'room_admin_entrance', 'ROOM_ADMINS', 'ROOM_CHANGE'
|
||||
):
|
||||
_COMMAND_HANDLERS[cmd] = None
|
||||
del cmd
|
||||
@ -638,6 +629,7 @@ class BLiveClient:
|
||||
await handler(self, command)
|
||||
else:
|
||||
logger.warning('room %d 未知命令:cmd=%s %s', self.room_id, cmd, command)
|
||||
# 只有第一次遇到未知命令时log
|
||||
self._COMMAND_HANDLERS[cmd] = None
|
||||
|
||||
async def _on_receive_popularity(self, popularity: int):
|
||||
|
Loading…
Reference in New Issue
Block a user