Added possibility to manually trigger an update of the vote message

This commit is contained in:
Elnath 2021-07-01 14:57:13 +02:00
parent 45c16cb9ad
commit ee1619c757
1 changed files with 10 additions and 0 deletions

View File

@ -372,6 +372,16 @@ class SecretBot(commands.Cog):
await game.shuffle_discard_into_deck() await game.shuffle_discard_into_deck()
await ctx.reply(":white_check_mark: The discard and draw pile have been shuffled") await ctx.reply(":white_check_mark: The discard and draw pile have been shuffled")
@commands.command("ForceUpdateVoteMessage", help = "Trigger an update of the vote message")
async def force_update_vote_message(self, ctx: commands.Context):
game = await self.get_running_game_or_error_message(ctx)
await self.check_is_administrator_or_gm(ctx)
if game.is_vote_running():
await game.update_vote_message()
await ctx.reply(":white_check_mark: Done.")
else:
await ctx.reply(":x: There is no vote running")
if __name__ == '__main__': if __name__ == '__main__':
argparser = argparse.ArgumentParser(description = "Secret Hitler helper bot", formatter_class = argparse.ArgumentDefaultsHelpFormatter) argparser = argparse.ArgumentParser(description = "Secret Hitler helper bot", formatter_class = argparse.ArgumentDefaultsHelpFormatter)