v11.io

v11 输出输出层

class melobot.protocols.onebot.v11.io.BaseIO[源代码]

基类:AbstractIOSource[InPacket, OutPacket, EchoPacket]

变量:

cd_time (float) -- 发送行为操作的冷却时间(防风控)

class melobot.protocols.onebot.v11.io.ForwardWebSocketIO[源代码]

基类:BaseIO

__init__(url: str, max_retry: int = -1, retry_delay: float = 4.0, cd_time: float = 0.2, access_token: str | None = None) None[源代码]
参数:
返回类型:

None

opened() bool[源代码]

源是否已打开

返回类型:

bool

class melobot.protocols.onebot.v11.io.ReverseWebSocketIO[源代码]

基类:BaseIO

__init__(host: str, port: int, cd_time: float = 0.2, access_token: str | None = None) None[源代码]
参数:
返回类型:

None

opened() bool[源代码]

源是否已打开

返回类型:

bool

class melobot.protocols.onebot.v11.io.HttpIO[源代码]

基类:BaseIO

__init__(onebot_host: str, onebot_port: int, serve_host: str, serve_port: int, secret: str | None = None, access_token: str | None = None, cd_time: float = 0.2) None[源代码]
参数:
  • onebot_host (str)

  • onebot_port (int)

  • serve_host (str)

  • serve_port (int)

  • secret (str | None)

  • access_token (str | None)

  • cd_time (float)

返回类型:

None

opened() bool[源代码]

源是否已打开

返回类型:

bool