No awaiting modlog_embed, check if massmention not None
This commit is contained in:
parent
91e82c6a86
commit
e43da56776
3 changed files with 7 additions and 6 deletions
|
@ -25,7 +25,7 @@ jarvis = commands.Bot(
|
|||
)
|
||||
slash = SlashCommand(jarvis, sync_commands=True, sync_on_cog_reload=True)
|
||||
jarvis_self = Process()
|
||||
__version__ = "1.9.0"
|
||||
__version__ = "1.9.1"
|
||||
|
||||
jconfig = get_config()
|
||||
db = DBManager(jconfig.mongo["connect"]).mongo
|
||||
|
|
|
@ -128,7 +128,7 @@ class ModlogMemberCog(commands.Cog):
|
|||
sort=MongoSort(key="created_at", type="desc"),
|
||||
)
|
||||
admin = before.guild.get_member(mute.admin)
|
||||
return await modlog_embed(
|
||||
return modlog_embed(
|
||||
member=before,
|
||||
admin=admin,
|
||||
log=log,
|
||||
|
@ -154,7 +154,7 @@ class ModlogMemberCog(commands.Cog):
|
|||
)
|
||||
mute = Mute(**mute)
|
||||
admin = before.guild.get_member(mute.admin)
|
||||
return await modlog_embed(
|
||||
return modlog_embed(
|
||||
member=before,
|
||||
admin=admin,
|
||||
log=log,
|
||||
|
@ -171,7 +171,7 @@ class ModlogMemberCog(commands.Cog):
|
|||
).flatten()
|
||||
log: discord.AuditLogEntry = get_latest_log(auditlog, before)
|
||||
admin: discord.User = log.user
|
||||
return await modlog_embed(
|
||||
return modlog_embed(
|
||||
member=before,
|
||||
admin=admin,
|
||||
log=log,
|
||||
|
@ -198,7 +198,7 @@ class ModlogMemberCog(commands.Cog):
|
|||
elif len(before.roles) < len(after.roles):
|
||||
role = find(lambda x: x not in before.roles, after.roles)
|
||||
role_text = role.mention if role else "||`[redacted]`||"
|
||||
return await modlog_embed(
|
||||
return modlog_embed(
|
||||
member=before,
|
||||
admin=admin,
|
||||
log=log,
|
||||
|
|
|
@ -96,7 +96,8 @@ class MessageEventHandler(object):
|
|||
setting="massmention",
|
||||
)
|
||||
if (
|
||||
massmention.value > 0
|
||||
massmention
|
||||
and massmention.value > 0
|
||||
and len(message.mentions)
|
||||
- (1 if message.author in message.mentions else 0)
|
||||
> massmention.value
|
||||
|
|
Loading…
Add table
Reference in a new issue