Skip to main content
Version: 2.6.1

nonebot.adapters.feishu.bot

async def send(bot, event, message, at_sender=False, **kwargs)

  • 说明: 默认回复消息处理函数。

  • 参数

  • 返回

    • Any

class Bot(adapter, self_id, *, bot_config, bot_info)

async method send_handler(event, message, at_sender=False, **kwargs)

  • 说明: 默认回复消息处理函数。

  • 参数

  • 返回

    • Any

async method get_msgs(container_id_type, container_id, **params)

  • 参数

    • container_id_type (Literal['chat'])

    • container_id (str)

    • **params (Any)

  • 返回

    • untyped

async method get_msg_resource(message_id, file_key, type_)

  • 参数

    • message_id (str)

    • file_key (str)

    • type_ (Literal['image', 'file'])

  • 返回

    • untyped

async method get_msg(message_id)

  • 参数

    • message_id (str)
  • 返回

    • untyped

async method get_msg_read_users(message_id, user_id_type, page_size=None, page_token=None)

  • 参数

    • message_id (str)

    • user_id_type (str)

    • page_size (int | None)

    • page_token (str | None)

  • 返回

    • untyped

async method merge_forward_msg(receive_id_type, receive_id, message_id_list, uuid=None)

  • 参数

    • receive_id_type (str)

    • receive_id (str)

    • message_id_list (list[str])

    • uuid (str | None)

  • 返回

    • untyped

async method forward_msg(message_id, receive_id, receive_id_type, uuid=None)

  • 参数

    • message_id (str)

    • receive_id (str)

    • receive_id_type (str)

    • uuid (str | None)

  • 返回

    • untyped

async method delete_msg(message_id)

  • 参数

    • message_id (str)
  • 返回

    • untyped

async method edit_msg(message_id, content, msg_type)

  • 参数

    • message_id (str)

    • content (str)

    • msg_type (str)

  • 返回

    • untyped

async method reply_msg(message_id, content, msg_type, uuid=None)

  • 参数

    • message_id (str)

    • content (str)

    • msg_type (str)

    • uuid (str | None)

  • 返回

    • untyped

async method send_msg(receive_id_type, receive_id, content, msg_type)

  • 参数

    • receive_id_type (Literal['chat_id', 'open_id'])

    • receive_id (str)

    • content (str)

    • msg_type (str)

  • 返回

    • untyped

async method get_file(file_key)

  • 参数

    • file_key (str)
  • 返回

    • untyped

async method post_file(file_type, file_name, file, duration=None)

  • 参数

    • file_type (Literal['opus', 'mp4', 'pdf', 'doc', 'xls', 'ppt', 'stream'])

    • file_name (str)

    • file (str | bytes | BytesIO | Path)

    • duration (int | None)

  • 返回

    • untyped

async method send(event, message, **kwargs)

  • 说明: 根据 event 向触发事件的主体回复消息。

  • 参数

  • 返回

    • Any: API 调用返回数据
  • 异常

    • ValueError: 缺少 user_id, group_id

    • NetworkError: 网络错误

    • ActionFailed: API 调用失败

async method call_api(api, **data)

  • 说明: :说明: 调用 飞书 协议 API :参数: api: str: API 名称 **data: Any: API 参数 :返回: - Any: API 调用返回数据 :异常: - NetworkError: 网络错误 - ActionFailed: API 调用失败

  • 参数

    • api (str)

    • **data

  • 返回

    • Any

async method handle_event(event)

  • 参数

  • 返回

    • None