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.
|
||||
- `<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
|
||||
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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user