Skip to content

Commit

Permalink
fix #143 clear vote on !ev
Browse files Browse the repository at this point in the history
  • Loading branch information
Jazcash committed Apr 2, 2023
1 parent 1bf0e03 commit 9097faf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/renderer/api/response-handlers/messages/battle-announcement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ export const battleAnnouncementHandlers = createMessageHandlers(
battle.currentVote.value = null;
},
},
{
regex: new RegExp(/\* Vote cancelled by (?<username>.*)/),
schema: Type.Object({
username: Type.String(),
}),
async handler(data, message) {
const battle = api.session.onlineBattle.value!;
battle.currentVote.value = null;
},
},
{
regex: new RegExp(/\* (?<numOfUsersAllowedToVote>\d*) users allowed to vote./),
schema: Type.Object({
Expand Down

0 comments on commit 9097faf

Please sign in to comment.