feat(aurora): imma be real chief i have no idea what i did this commit

This commit is contained in:
SeaswimmerTheFsh 2024-05-03 21:35:29 -04:00
parent a641b11daa
commit af108519f9
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F
4 changed files with 40 additions and 20 deletions

View file

@ -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, 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):
@ -224,7 +234,7 @@ class Aurora(commands.Cog):
moderation_type="note",
response=await interaction.original_response(),
)
await target.send(embed=embed)
await target.send(embed=embed, file=get_footer_image(self))
except discord.errors.HTTPException:
pass
@ -283,7 +293,7 @@ class Aurora(commands.Cog):
moderation_type="warned",
response=await interaction.original_response(),
)
await target.send(embed=embed)
await target.send(embed=embed, file=get_footer_image(self))
except discord.errors.HTTPException:
pass
@ -381,7 +391,7 @@ class Aurora(commands.Cog):
duration=parsed_time,
role=role,
)
await target.send(embed=embed)
await target.send(embed=embed, file=get_footer_image(self))
except discord.errors.HTTPException:
pass
@ -487,7 +497,7 @@ class Aurora(commands.Cog):
duration=parsed_time,
role=role,
)
await target.send(embed=embed)
await target.send(embed=embed, file=get_footer_image(self))
except discord.errors.HTTPException:
pass
@ -583,7 +593,7 @@ class Aurora(commands.Cog):
response=await interaction.original_response(),
duration=parsed_time,
)
await target.send(embed=embed)
await target.send(embed=embed, file=get_footer_image(self))
except discord.errors.HTTPException:
pass
@ -658,7 +668,7 @@ class Aurora(commands.Cog):
moderation_type="unmuted",
response=await interaction.original_response(),
)
await target.send(embed=embed)
await target.send(embed=embed, file=get_footer_image(self))
except discord.errors.HTTPException:
pass
@ -717,7 +727,7 @@ class Aurora(commands.Cog):
moderation_type="kicked",
response=await interaction.original_response(),
)
await target.send(embed=embed)
await target.send(embed=embed, file=get_footer_image(self))
except discord.errors.HTTPException:
pass
@ -821,7 +831,7 @@ class Aurora(commands.Cog):
response=await interaction.original_response(),
duration=parsed_time,
)
await target.send(embed=embed)
await target.send(embed=embed, file=get_footer_image(self))
except discord.errors.HTTPException:
pass
@ -865,7 +875,7 @@ class Aurora(commands.Cog):
moderation_type="banned",
response=await interaction.original_response(),
)
await target.send(embed=embed)
await target.send(embed=embed, file=get_footer_image(self))
except discord.errors.HTTPException:
pass
@ -948,7 +958,7 @@ class Aurora(commands.Cog):
moderation_type="unbanned",
response=await interaction.original_response(),
)
await target.send(embed=embed)
await target.send(embed=embed, file=get_footer_image(self))
except discord.errors.HTTPException:
pass
@ -1646,6 +1656,7 @@ class Aurora(commands.Cog):
embed = await message_factory(
await self.bot.get_embed_color(guild.channels[0]),
file=get_footer_image(self),
guild=guild,
reason=f"Automatic unban from case #{moderation_id}",
moderation_type="unbanned",