From 3c968526521b183f17c1c524af14b884fb013b1a Mon Sep 17 00:00:00 2001 From: Ske Date: Thu, 17 Jan 2019 13:15:47 +0000 Subject: [PATCH] Add confirmation prompt when unlinking. Closes #38. --- src/pluralkit/bot/commands/system_commands.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pluralkit/bot/commands/system_commands.py b/src/pluralkit/bot/commands/system_commands.py index 021bfef9..1ff2e343 100644 --- a/src/pluralkit/bot/commands/system_commands.py +++ b/src/pluralkit/bot/commands/system_commands.py @@ -180,6 +180,10 @@ async def account_link(ctx: CommandContext): async def account_unlink(ctx: CommandContext): system = await ctx.ensure_system() + + msg = await ctx.reply("Are you sure you want to unlink this account from your system?") + if not await ctx.confirm_react(ctx.message.author, msg): + raise CommandError("Account unlink cancelled.") try: await system.unlink_account(ctx.conn, ctx.message.author.id)