mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Clear the view in [p]set api after timeout (#6166)
This commit is contained in:
parent
4dc7efab29
commit
b1c3b37235
@ -3602,13 +3602,11 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic):
|
|||||||
- `<service>` - The service you're adding tokens to.
|
- `<service>` - The service you're adding tokens to.
|
||||||
- `<tokens>` - Pairs of token keys and values. The key and value should be separated by one of ` `, `,`, or `;`.
|
- `<tokens>` - 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
|
if service is None or tokens is None:
|
||||||
await ctx.send(_("Click the button below to set your keys."), view=SetApiView())
|
view = SetApiView(default_service=service)
|
||||||
elif tokens is None:
|
msg = await ctx.send(_("Click the button below to set your keys."), view=view)
|
||||||
await ctx.send(
|
await view.wait()
|
||||||
_("Click the button below to set your keys."),
|
await msg.edit(content=_("This API keys setup message has expired."), view=None)
|
||||||
view=SetApiView(default_service=service),
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
if ctx.bot_permissions.manage_messages:
|
if ctx.bot_permissions.manage_messages:
|
||||||
await ctx.message.delete()
|
await ctx.message.delete()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user