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')
评论列表
文章目录