WIP: Refactor Aurora (3.0.0) #29
1 changed files with 54 additions and 51 deletions
|
@ -113,7 +113,7 @@ class Aurora(commands.Cog):
|
||||||
self.handle_expiry.cancel()
|
self.handle_expiry.cancel()
|
||||||
|
|
||||||
@commands.Cog.listener("on_guild_join")
|
@commands.Cog.listener("on_guild_join")
|
||||||
async def db_generate_guild_join(self, guild: discord.Guild):
|
async def db_generate_on_guild_join(self, guild: discord.Guild):
|
||||||
"""This method prepares the database schema whenever the bot joins a guild."""
|
"""This method prepares the database schema whenever the bot joins a guild."""
|
||||||
if not await self.bot.cog_disabled_in_guild(self, guild):
|
if not await self.bot.cog_disabled_in_guild(self, guild):
|
||||||
try:
|
try:
|
||||||
|
@ -135,6 +135,7 @@ class Aurora(commands.Cog):
|
||||||
@commands.Cog.listener("on_audit_log_entry_create")
|
@commands.Cog.listener("on_audit_log_entry_create")
|
||||||
async def autologger(self, entry: discord.AuditLogEntry):
|
async def autologger(self, entry: discord.AuditLogEntry):
|
||||||
"""This method automatically logs moderations done by users manually ("right clicks")."""
|
"""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 not await self.bot.cog_disabled_in_guild(self, entry.guild):
|
||||||
if await config.guild(entry.guild).ignore_other_bots() is True:
|
if await config.guild(entry.guild).ignore_other_bots() is True:
|
||||||
if entry.user.bot or entry.target.bot:
|
if entry.user.bot or entry.target.bot:
|
||||||
|
@ -187,6 +188,8 @@ class Aurora(commands.Cog):
|
||||||
duration,
|
duration,
|
||||||
reason,
|
reason,
|
||||||
)
|
)
|
||||||
|
except AttributeError:
|
||||||
|
return
|
||||||
|
|
||||||
#######################################################################################################################
|
#######################################################################################################################
|
||||||
### COMMANDS
|
### COMMANDS
|
||||||
|
|
Loading…
Reference in a new issue