Skip to content

Commit

Permalink
关闭节奏风暴的参考方法
Browse files Browse the repository at this point in the history
  • Loading branch information
yjqiang committed Apr 12, 2019
1 parent d4f626f commit 467b747
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion danmu/bili_danmu_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ def handle_danmu(self, data: dict):
elif msg_type == 6:
raffle_name = '二十倍节奏风暴'
print(f'{self._area_id}号数据连接检测到{real_roomid:^9}{raffle_name}')
# raffle_handler.push2queue(StormRaffleHandlerTask, real_roomid)
raffle_handler.push2queue(StormRaffleHandlerTask, real_roomid)
bili_statistics.add2pushed_raffles(raffle_name)
return True
4 changes: 2 additions & 2 deletions danmu/yj_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def handle_danmu(self, dict_danmu):
if type == '~' and not msg_id % 2:
raffle_id = id
print(f'{self._area_id}号弹幕监控检测到{"0":^9}的节奏风暴(id: {raffle_id})')
# raffle_handler.exec_at_once(StormRaffleHandlerTask, 0, raffle_id)
raffle_handler.exec_at_once(StormRaffleHandlerTask, 0, raffle_id)
bili_statistics.add2pushed_raffles('Yj协同节奏风暴', 2)
result = self.__combine_piece(uid, msg)
if result is None:
Expand Down Expand Up @@ -171,7 +171,7 @@ def handle_danmu(self, data: dict):
raffle_id = data['raffle_id']
raffle_roomid = 0
print(f'{self._area_id}号弹幕监控检测到{raffle_roomid:^9}的节奏风暴(id: {raffle_id})')
# raffle_handler.exec_at_once(StormRaffleHandlerTask, 0, raffle_id)
raffle_handler.exec_at_once(StormRaffleHandlerTask, 0, raffle_id)
bili_statistics.add2pushed_raffles('Yj协同节奏风暴', 2)
elif raffle_type == 'GUARD':
raffle_id = data['raffle_id']
Expand Down
1 change: 1 addition & 0 deletions tasks/storm_raffle_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def target(step):
# 为了速度,有时不用等room_id验证就参加,置room_id为0,is_normal_room自然会返回固定值true
@staticmethod
async def check(user, room_id, raffle_id=None):
return
if not await UtilsTask.is_normal_room(user, room_id):
return
if raffle_id is not None:
Expand Down

0 comments on commit 467b747

Please sign in to comment.