mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Add confirmation prompt when unlinking. Closes #38.
This commit is contained in:
parent
47a81d42ce
commit
3c96852652
1 changed files with 4 additions and 0 deletions
|
|
@ -181,6 +181,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)
|
||||
except UnlinkingLastAccountError as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue