From ee1619c757328974d51525d99e3b40202cefb019 Mon Sep 17 00:00:00 2001 From: Elnath Date: Thu, 1 Jul 2021 14:57:13 +0200 Subject: [PATCH] Added possibility to manually trigger an update of the vote message --- SecretBot.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SecretBot.py b/SecretBot.py index 67cc10b..f7315b1 100755 --- a/SecretBot.py +++ b/SecretBot.py @@ -372,6 +372,16 @@ class SecretBot(commands.Cog): await game.shuffle_discard_into_deck() 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__': argparser = argparse.ArgumentParser(description = "Secret Hitler helper bot", formatter_class = argparse.ArgumentDefaultsHelpFormatter)