Added command to force a shuffle of the draw and discard
This commit is contained in:
parent
a00120d559
commit
06629433b8
11
SecretBot.py
11
SecretBot.py
|
|
@ -361,6 +361,17 @@ class SecretBot(commands.Cog):
|
||||||
await self.check_is_administrator_or_gm(ctx)
|
await self.check_is_administrator_or_gm(ctx)
|
||||||
await game.veto()
|
await game.veto()
|
||||||
|
|
||||||
|
@commands.command("ForceShuffle", help = "Force a shuffle of the discard into the draw pile")
|
||||||
|
async def force_shuffle_with_confirmation(self, ctx: commands.Context):
|
||||||
|
await self.check_is_administrator_or_gm(ctx)
|
||||||
|
await self.confirm_action("Are you sure that you want to force a shuffle of the discard and draw pile?", ctx.channel, self.force_shuffle(ctx), ctx.message)
|
||||||
|
|
||||||
|
async def force_shuffle(self, ctx: commands.Context):
|
||||||
|
game = await self.get_running_game_or_error_message(ctx)
|
||||||
|
await self.check_is_administrator_or_gm(ctx)
|
||||||
|
await game.shuffle_discard_into_deck()
|
||||||
|
await ctx.reply(":white_check_mark: The discard and draw pile have been shuffled")
|
||||||
|
|
||||||
|
|
||||||
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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue