Didn't mean to add modlog, so added setup since last commit included working modlog features. References #10

This commit is contained in:
Zeva Rose 2021-07-04 19:57:02 -06:00
parent eae0a5d4d7
commit 9912f797f3

View file

@ -158,6 +158,8 @@ class ModlogCog(commands.Cog):
{"guild": user.guild.id, "setting": "modlog"}
)
if modlog:
channel = user.guild.get_channel(modlog["value"])
await asyncio.sleep(0.5) # Need to wait for audit log
embed = None
mute = self.db.jarvis.settings.find_one(
{"guild": before.guild.id, "setting": "mute"}
@ -186,8 +188,7 @@ class ModlogCog(commands.Cog):
):
# TODO: User was verified
pass
channel = user.guild.get_channel(modlog["value"])
await asyncio.sleep(0.5) # Need to wait for audit log
auditlog = await user.guild.audit_logs(
limit=50,
action=discord.AuditLogAction.kick,
@ -223,3 +224,7 @@ class ModlogCog(commands.Cog):
)
await channel.send(embed=embed)
def setup(bot):
bot.add_cog(ModlogCog(bot))