Skip to content

Commit

Permalink
counting restarts when error occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
aaj2005 committed Dec 13, 2024
1 parent fbc89c3 commit 25c30e2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cogs/commands/counting.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def check_dec(m):
# Used to make sure someone else replies
last_player = msg.author

while True:
while self.currently_playing:
# Wait for the next numeric message sent by a different person in the same channel
def check_dec_player(m):
return check_dec(m) and m.author != last_player
Expand Down Expand Up @@ -205,8 +205,11 @@ async def me(self, ctx: Context):

@user.error
async def user_error(self, ctx: Context, err):
self.currently_playing = False
await ctx.send(err)

@counting.error
async def counting_error(self, ctx: Context, err):
self.currently_playing = False

async def setup(bot: Bot):
await bot.add_cog(Counting(bot))

0 comments on commit 25c30e2

Please sign in to comment.