config.py 文件源码

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

项目:jose 作者: lnmds 项目源码 文件源码
def blockreason(self, ctx, anything_id: int):
        """Get a reason for a block if it exists"""
        userblock = await self.block_coll.find_one({'user_id': anything_id})
        if userblock is not None:
            e = discord.Embed(title='User blocked')
            e.description = f'<@{anything_id}> - {userblock.get("reason")}'
            return await ctx.send(embed=e)

        guildblock = await self.block_coll.find_one({'guild_id': anything_id})
        if guildblock is not None:
            e = discord.Embed(title='Guild blocked')
            e.description = f'why? {userblock.get("reason")}'
            return await ctx.send(embed=e)

        await ctx.send('Block not found')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号