WIP: Refactor Aurora (3.0.0) #29
1 changed files with 15 additions and 15 deletions
|
@ -46,7 +46,7 @@ class Aurora(commands.Cog):
|
|||
This cog stores all of its data in an SQLite database."""
|
||||
|
||||
__author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"]
|
||||
__version__ = "3.0.0-indev22"
|
||||
__version__ = "3.0.0-indev23"
|
||||
__git__ = "https://www.coastalcommits.com/cswimr/SeaCogs"
|
||||
__documentation__ = "https://seacogs.coastalcommits.com/aurora/"
|
||||
|
||||
|
@ -189,13 +189,13 @@ class Aurora(commands.Cog):
|
|||
reason = "This action was performed without the bot."
|
||||
|
||||
if entry.action == discord.AuditLogAction.kick:
|
||||
moderation_type = "KICK"
|
||||
moderation_type = type_registry['kick']
|
||||
|
||||
elif entry.action == discord.AuditLogAction.ban:
|
||||
moderation_type = "BAN"
|
||||
moderation_type = type_registry['ban']
|
||||
|
||||
elif entry.action == discord.AuditLogAction.unban:
|
||||
moderation_type = "UNBAN"
|
||||
moderation_type = type_registry['unban']
|
||||
|
||||
elif entry.action == discord.AuditLogAction.member_update:
|
||||
if entry.after.timed_out_until is not None:
|
||||
|
@ -207,22 +207,22 @@ class Aurora(commands.Cog):
|
|||
)
|
||||
minutes = round(duration_datetime.total_seconds() / 60)
|
||||
duration = timedelta(minutes=minutes)
|
||||
moderation_type = "MUTE"
|
||||
moderation_type = type_registry['mute']
|
||||
else:
|
||||
moderation_type = "UNMUTE"
|
||||
moderation_type = type_registry['unmute']
|
||||
else:
|
||||
return
|
||||
|
||||
await Moderation.log(
|
||||
self.bot,
|
||||
entry.guild.id,
|
||||
entry.user.id,
|
||||
moderation_type,
|
||||
"USER",
|
||||
entry.target.id,
|
||||
None,
|
||||
duration,
|
||||
reason,
|
||||
bot=self.bot,
|
||||
guild_id=entry.guild.id,
|
||||
moderator_id=entry.user.id,
|
||||
moderation_type=moderation_type,
|
||||
target_type="USER",
|
||||
target_id=entry.target.id,
|
||||
role_id=None,
|
||||
duration=duration,
|
||||
reason=reason,
|
||||
)
|
||||
except AttributeError:
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue