From bd48b4351776ad7fe8ab8504fb482310224a0d05 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 3 May 2024 22:21:28 -0400 Subject: [PATCH] fix(aurora): reduced view timeouts to 60 seconds --- aurora/aurora.py | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/aurora/aurora.py b/aurora/aurora.py index 0b338c6..15a9b2f 100644 --- a/aurora/aurora.py +++ b/aurora/aurora.py @@ -19,7 +19,8 @@ from redbot.core import app_commands, commands, data_manager from redbot.core.app_commands import Choice from redbot.core.bot import Red from redbot.core.commands.converter import parse_relativedelta, parse_timedelta -from redbot.core.utils.chat_formatting import box, error, humanize_list, humanize_timedelta, warning +from redbot.core.utils.chat_formatting import (box, error, humanize_list, + humanize_timedelta, warning) from aurora.importers.aurora import ImportAuroraView from aurora.importers.galacticbot import ImportGalacticBotView @@ -28,10 +29,19 @@ from aurora.menus.guild import Guild from aurora.menus.immune import Immune from aurora.menus.overrides import Overrides from aurora.utilities.config import config, register_config -from aurora.utilities.database import connect, create_guild_table, fetch_case, mysql_log -from aurora.utilities.factory import addrole_embed, case_factory, changes_factory, evidenceformat_factory, guild_embed, immune_embed, message_factory, overrides_embed +from aurora.utilities.database import (connect, create_guild_table, fetch_case, + mysql_log) +from aurora.utilities.factory import (addrole_embed, case_factory, + changes_factory, evidenceformat_factory, + guild_embed, immune_embed, + message_factory, overrides_embed) from aurora.utilities.logger import logger -from aurora.utilities.utils import check_moddable, check_permissions, convert_timedelta_to_str, fetch_channel_dict, fetch_user_dict, generate_dict, get_footer_image, log, send_evidenceformat, timedelta_from_relativedelta +from aurora.utilities.utils import (check_moddable, check_permissions, + convert_timedelta_to_str, + fetch_channel_dict, fetch_user_dict, + generate_dict, get_footer_image, log, + send_evidenceformat, + timedelta_from_relativedelta) class Aurora(commands.Cog): @@ -1789,7 +1799,7 @@ class Aurora(commands.Cog): async def aurora_settings_overrides(self, ctx: commands.Context): """Manage Aurora's user overriddable settings.""" msg = await ctx.send(embed=await overrides_embed(ctx)) - await msg.edit(view=Overrides(ctx, msg, 180)) + await msg.edit(view=Overrides(ctx, msg, 60)) @aurora_settings.command(name="guild", aliases=["server"]) @commands.admin_or_permissions(manage_guild=True) @@ -1797,7 +1807,7 @@ class Aurora(commands.Cog): async def aurora_settings_guild(self, ctx: commands.Context): """Manage Aurora's guild settings.""" msg = await ctx.send(embed=await guild_embed(ctx)) - await msg.edit(view=Guild(ctx, msg, 180)) + await msg.edit(view=Guild(ctx, msg, 60)) @aurora_settings.command(name="addrole", aliases=["removerole"]) @commands.admin_or_permissions(manage_guild=True) @@ -1807,7 +1817,7 @@ class Aurora(commands.Cog): Roles added to this list are also applied to `/removerole`.""" msg = await ctx.send(embed=await addrole_embed(ctx)) - await msg.edit(view=Addrole(ctx, msg, 180)) + await msg.edit(view=Addrole(ctx, msg, 60)) @aurora_settings.command(name="immunity") @commands.admin_or_permissions(manage_guild=True) @@ -1815,7 +1825,7 @@ class Aurora(commands.Cog): async def aurora_settings_immunity(self, ctx: commands.Context): """Manage the immunity whitelist.""" msg = await ctx.send(embed=await immune_embed(ctx)) - await msg.edit(view=Immune(ctx, msg, 180)) + await msg.edit(view=Immune(ctx, msg, 60)) @aurora.group(autohelp=True, name="import") @commands.admin()