diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index 0a9801271..05bdc390e 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -3602,13 +3602,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic): - `` - The service you're adding tokens to. - `` - Pairs of token keys and values. The key and value should be separated by one of ` `, `,`, or `;`. """ - if service is None: # Handled in order of missing operations - await ctx.send(_("Click the button below to set your keys."), view=SetApiView()) - elif tokens is None: - await ctx.send( - _("Click the button below to set your keys."), - view=SetApiView(default_service=service), - ) + if service is None or tokens is None: + view = SetApiView(default_service=service) + msg = await ctx.send(_("Click the button below to set your keys."), view=view) + await view.wait() + await msg.edit(content=_("This API keys setup message has expired."), view=None) else: if ctx.bot_permissions.manage_messages: await ctx.message.delete()