Skip to content

Commit

Permalink
fix: 修复“牛牛继续唱”失效
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Dec 10, 2023
1 parent 75c6d59 commit 6dbda7c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/plugins/sing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def is_to_sing(bot: Bot, event: Event, state: T_State) -> bool:
if not text:
return False

if not SING_CMD in text:
if not SING_CMD in text and not any([cmd in text for cmd in SING_CONTINUE_CMDS]):
return False

if text.endswith(SING_CMD):
Expand Down Expand Up @@ -75,8 +75,11 @@ async def is_to_sing(bot: Bot, event: Event, state: T_State) -> bool:
state['chunk_index'] = 0
return True

progress = GroupConfig(group_id=event.group_id).sing_progress()
if text in SING_CONTINUE_CMDS and progress:
if text in SING_CONTINUE_CMDS:
progress = GroupConfig(group_id=event.group_id).sing_progress()
if not progress:
return False

song_id = progress['song_id']
chunk_index = progress['chunk_index']
key_val = progress['key']
Expand Down

0 comments on commit 6dbda7c

Please sign in to comment.