mod.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:PyMiki 作者: TheGrammarJew 项目源码 文件源码
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.')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号