bot.py 文件源码

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

项目:aioviber 作者: nonamenix 项目源码 文件源码
def get_app(self, static_serve=False) -> web.Application:
        """
        Create aiohttp application for webhook handling
        """
        app = get_app(self, static_serve=static_serve)

        # webhook handler
        webhook_path = urlparse(self.webhook).path
        app.router.add_post(webhook_path, self.webhook_handle)

        # viber webhooks registering
        if self._unset_webhook_on_cleanup:
            app.on_cleanup.append(lambda a: a.bot.api.unset_webhook())

        if self._set_webhook_on_startup:
            app.on_startup.append(lambda a: a.bot.set_webhook_on_startup())

        return app
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号