context.py 文件源码

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

项目:dogbot 作者: slice 项目源码 文件源码
def ok(self, emoji: str = '\N{OK HAND SIGN}'):
        """
        Adds a reaction to the command message, or sends it to the channel if
        we can't add reactions. This should be used as feedback to commands,
        just like how most bots send out `:ok_hand:` when a command completes
        successfully.
        """

        try:
            await self.message.add_reaction(emoji)
        except Forbidden:
            # can't add reactions
            await self.send(emoji)
        except NotFound:
            # the command message got deleted somehow
            pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号