alert.py 文件源码

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

项目:PyPlanet 作者: PyPlanet 项目源码 文件源码
def handle(self, player, action, values, **kwargs):  # pragma: no cover
        await self.close(player)

        # Try to parse the button id instead of the whole action string.
        button = action
        try:
            match = re.search('button_([0-9]+)$', action)
            if len(match.groups()) == 1:
                button = match.group(1)
        except:
            pass

        if not self.response_future.done():
            self.response_future.set_result(button)

        if self.target:
            await self.target(player, action, values, **kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号