async def self_check(cls):
        """
        Check that the configuration is correct

        - Presence of "token" in the settings
        - Presence of "BERNARD_BASE_URL" in the global configuration
        """

        # noinspection PyTypeChecker
        async for check in super(Telegram, cls).self_check():
            yield check

        s = cls.settings()

        try:
            assert isinstance(s['token'], str)
        except (KeyError, TypeError, AssertionError):
            yield HealthCheckFail(
                '00005',
                'Missing "token" for Telegram platform. You can obtain one by'
                'registering your bot in Telegram.',
            )

        if not hasattr(settings, 'BERNARD_BASE_URL'):
            yield HealthCheckFail(
                '00005',
                '"BERNARD_BASE_URL" cannot be found in the configuration. The'
                'Telegram platform needs it because it uses it to '
                'automatically register its hook.'
            )

        if not hasattr(settings, 'WEBVIEW_SECRET_KEY'):
            yield HealthCheckFail(
                '00005',
                '"WEBVIEW_SECRET_KEY" cannot be found in the configuration. '
                'It is required in order to be able to create secure postback '
                'URLs.'
            )