From 416e168d2b68021a659436b7d493e2c4bb3ceaa2 Mon Sep 17 00:00:00 2001 From: palmtree5 Date: Fri, 13 Jan 2017 06:57:13 -0600 Subject: [PATCH] [Economy] Added [p]bank reset (#570) --- cogs/economy.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cogs/economy.py b/cogs/economy.py index bbac083b3..2dc6ca33d 100644 --- a/cogs/economy.py +++ b/cogs/economy.py @@ -398,6 +398,19 @@ class Economy: except NoAccount: await self.bot.say("User has no bank account.") + @_bank.command(pass_context=True, no_pm=True) + @checks.serverowner_or_permissions(administrator=True) + async def reset(self, ctx, confirmation: bool=False): + """Deletes all server's bank accounts""" + if confirmation is False: + await self.bot.say("This will delete all bank accounts on " + "this server.\nIf you're sure, type " + "{}bank reset yes".format(ctx.prefix)) + else: + self.bank.wipe_bank(ctx.message.server) + await self.bot.say("All bank accounts of this server have been " + "deleted.") + @commands.command(pass_context=True, no_pm=True) async def payday(self, ctx): # TODO """Get some free credits"""