1
0
Fork 0
mirror of synced 2024-06-08 05:34:33 +12:00

Used the new cooldown reset method

This commit is contained in:
phxntxm 2016-09-11 03:32:36 -05:00
parent f4291ab923
commit 374a0433aa

View file

@ -114,9 +114,7 @@ class Hangman:
"""Makes a guess towards the server's currently running hangman game"""
game = self.games.get(ctx.message.server.id)
if not game:
bucket = ctx.command._buckets.get_bucket(ctx)
bucket.is_rate_limited()
bucket._token = bucket.rate
ctx.command.reset_cooldown(ctx)
await self.bot.say("There are currently no hangman games running!")
return
@ -126,9 +124,7 @@ class Hangman:
# And also add a message for a loss/win
if len(guess) == 1:
if guess in game.guessed_letters:
bucket = ctx.command._buckets.get_bucket(ctx)
bucket.is_rate_limited()
bucket._tokens = bucket.rate
ctx.command.reset_cooldown(ctx)
await self.bot.say("That letter has already been guessed!")
# Return here as we don't want to count this as a failure
return