Compare commits

..

No commits in common. "7c8aaba309a90b15c5f46006f21282b2b00ac9e8" and "818ff810eafa51dadac0b94c56fca8e62de3db65" have entirely different histories.

View file

@ -46,7 +46,7 @@ class Aurora(commands.Cog):
This cog stores all of its data in an SQLite database."""
__author__ = ["Seaswimmer"]
__version__ = "3.0.0-indev2"
__version__ = "3.0.0-indev1"
__documentation__ = "https://seacogs.coastalcommits.com/aurora/"
async def red_delete_data_for_user(self, *, requester, user_id: int):
@ -113,7 +113,7 @@ class Aurora(commands.Cog):
self.handle_expiry.cancel()
@commands.Cog.listener("on_guild_join")
async def db_generate_on_guild_join(self, guild: discord.Guild):
async def db_generate_guild_join(self, guild: discord.Guild):
"""This method prepares the database schema whenever the bot joins a guild."""
if not await self.bot.cog_disabled_in_guild(self, guild):
try:
@ -126,7 +126,7 @@ class Aurora(commands.Cog):
"""This method automatically adds roles to users when they join the server."""
if not await self.bot.cog_disabled_in_guild(self, member.guild):
query = f"""SELECT moderation_id, role_id, reason FROM moderation_{member.guild.id} WHERE target_id = ? AND moderation_type = 'ADDROLE' AND expired = 0 AND resolved = 0;"""
results = await Moderation.execute(query, (member.id,))
results = Moderation.execute(query, (member.id,))
for row in results:
role = member.guild.get_role(row[1])
reason = row[2]
@ -135,7 +135,6 @@ class Aurora(commands.Cog):
@commands.Cog.listener("on_audit_log_entry_create")
async def autologger(self, entry: discord.AuditLogEntry):
"""This method automatically logs moderations done by users manually ("right clicks")."""
try:
if not await self.bot.cog_disabled_in_guild(self, entry.guild):
if await config.guild(entry.guild).ignore_other_bots() is True:
if entry.user.bot or entry.target.bot:
@ -188,8 +187,6 @@ class Aurora(commands.Cog):
duration,
reason,
)
except AttributeError:
return
#######################################################################################################################
### COMMANDS