stars.py 文件源码

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

项目:jose 作者: lnmds 项目源码 文件源码
def unstar(self, ctx, message_id: int):
        """Unstar a message."""
        try:
            message = await ctx.channel.get_message(message_id)
        except discord.NotFound:
            return await ctx.send('Message not found')
        except discord.Forbidden:
            return await ctx.send("Can't retrieve message")
        except discord.HTTPException as err:
            return await ctx.send(f'Failed to retrieve message: {err!r}')

        try:
            await self.remove_star(message, ctx.author)
            await ctx.ok()
        except (StarRemoveError, StarError) as err:
            log.warning(f'[unstar_cmd] Errored: {err!r}')
            return await ctx.send(f'Failed to remove star: {err!r}')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号