def mentionspam_unignore(self, ctx, *channels: discord.TextChannel):
"""Specifies what channels to take off the ignore list.
To use this command you must have the Ban Members permission.
"""
if len(channels) == 0:
return await ctx.send('Missing channels to protect.')
query = """UPDATE guild_mod_config
SET safe_mention_channel_ids =
ARRAY(SELECT element FROM unnest(safe_mention_channel_ids) AS element
WHERE NOT(element = ANY($2::bigint[])))
WHERE id = $1;
"""
await ctx.db.execute(query, ctx.guild.id, [c.id for c in channels])
self.get_guild_settings.invalidate(self, ctx.guild.id)
await ctx.send('Updated mentionspam ignore list.')
评论列表
文章目录