Skip to content
On this page

alicebot.adapter.cqhttp.exceptions

CQHTTP 适配器异常。

class CQHTTPException

Bases: alicebot.exceptions.AdapterException

CQHTTP 异常基类。

method __init__(self, /, *args, **kwargs) {#Exception.__init__}

Initialize self. See help(type(self)) for accurate signature.

  • Arguments

    • args

    • kwargs

class NetworkError

Bases: alicebot.adapter.cqhttp.exceptions.CQHTTPException

网络异常。

method __init__(self, /, *args, **kwargs) {#Exception.__init__}

Initialize self. See help(type(self)) for accurate signature.

  • Arguments

    • args

    • kwargs

class ActionFailed

Bases: alicebot.adapter.cqhttp.exceptions.CQHTTPException

API 请求成功响应,但响应表示 API 操作失败。

method __init__(self, resp) {#ActionFailed.__init__}

初始化。

  • Arguments

    • resp (Dict[str, Any]) - 返回的响应。
  • Returns

    Type: None

class ApiNotAvailable

Bases: alicebot.adapter.cqhttp.exceptions.ActionFailed

API 请求返回 404,表示当前请求的 API 不可用或不存在。

  • Attributes

    • ERROR_CODE (ClassVar[int])

method __init__(self, resp) {#ActionFailed.__init__}

初始化。

  • Arguments

    • resp (Dict[str, Any]) - 返回的响应。
  • Returns

    Type: None

class ApiTimeout

Bases: alicebot.adapter.cqhttp.exceptions.CQHTTPException

API 请求响应超时。

method __init__(self, /, *args, **kwargs) {#Exception.__init__}

Initialize self. See help(type(self)) for accurate signature.

  • Arguments

    • args

    • kwargs

Released under the MIT License.