messages.py 文件源码

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

项目:FalltoSkyBot 作者: Sakiut 项目源码 文件源码
def report(self, ctx, user: discord.Member, *, reason: str):
        """Reporte un utilisateur au staff"""

        await self.bot.delete_message(ctx.message)

        server = ctx.message.server
        Channels = server.channels
        End = []

        Return = False

        for chan in list(Channels):
            Name = str(chan.name)
            Type = str(chan.type)
            if "moderation" in str(chan.name):
                if Type is "text":
                    ModChan = chan
                    Return = True

        if Return is not True:
            ModChan = await self.bot.create_channel(server, 'moderation', type=discord.ChannelType.text)

        await self.bot.send_message(ModChan, "{0} a été report par {1}, raison : {2}, @here".format(user.mention, ctx.message.author.mention, reason))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号