How to use the mattermostdriver.Websocket function in mattermostdriver

To help you get started, we’ve selected a few mattermostdriver examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github opsdroid / opsdroid / opsdroid / connector / mattermost / View on Github external
async def connect(self):
        """Connect to the chat service.""""Connecting to Mattermost"))

        login_response = self.mm_driver.login()

        if "id" in login_response:
            self.bot_id = login_response["id"]
        if "username" in login_response:
            self.bot_name = login_response["username"]"Connected as %s"), self.bot_name)

        self.mm_driver.websocket = Websocket(
            self.mm_driver.options, self.mm_driver.client.token
        )"Connected successfully"))