nonebot.adapters.feishu.message
class MessageSegment(<auto>)
-
说明: 飞书 协议 MessageSegment 适配。具体方法参考协议消息段类型或源码。
-
参数
auto
classmethod get_message_class()
-
参数
empty
-
返回
- type[Message]
method is_text()
-
参数
empty
-
返回
- bool
staticmethod text(text)
-
参数
text(str)
-
返回
- Text
staticmethod at(user_id)
-
参数
user_id(str)
-
返回
- untyped
staticmethod post(title, content)
-
参数
-
title(str) -
content(list[list[dict[str, Any]]])
-
-
返回
- Post
staticmethod image(image_key)
-
参数
image_key(str)
-
返回
- Image
staticmethod interactive(header, config, elements=None, i18n_elements=None)
-
参数
-
header(InteractiveHeader) -
config(InteractiveConfig) -
elements(list[dict[str, Any]] | None) -
i18n_elements(list[dict[str, Any]] | None)
-
-
返回
- untyped
staticmethod interactive_template(template_id, template_variable)
-
参数
-
template_id(str) -
template_variable(dict[str, Any])
-
-
返回
- InteractiveTemplate
staticmethod todo(task_id, summary, due_time)
-
参数
-
task_id(str) -
summary(_PostData) -
due_time(str)
-
-
返回
- untyped
staticmethod hongbao(text)
-
参数
text(str)
-
返回
- Hongbao
staticmethod system(template, from_user, to_chatters)
-
说明: 接收到的系统消息,不能用于发送,发送分割线请使用
system_divider。 -
参数
-
template(str) -
from_user(list[str]) -
to_chatters(list[str])
-
-
返回
- System
staticmethod system_divider(text, i18n_text=None, need_rollup=False)
-
说明: 分割线系统消息,目前仅在机器人与用户的单聊中生效,需要
im:message:send_sys_msg权限。 -
参数
-
text(str) -
i18n_text(dict[str, str] | None) -
need_rollup(bool)
-
-
返回
- SystemDivider
staticmethod location(name, longitude, latitude)
-
参数
-
name(str) -
longitude(str) -
latitude(str)
-
-
返回
- Location
staticmethod video_chat(topic, start_time)
-
参数
-
topic(str) -
start_time(str)
-
-
返回
- untyped
staticmethod share_chat(chat_id)
-
参数
chat_id(str)
-
返回
- MessageSegment
staticmethod share_user(user_id)
-
参数
user_id(str)
-
返回
- MessageSegment
staticmethod audio(file_key, duration=None)
-
参数
-
file_key(str) -
duration(int | None)
-
-
返回
- MessageSegment
staticmethod media(file_key, image_key=None, file_name=None, duration=None)
-
参数
-
file_key(str) -
image_key(str | None) -
file_name(str | None) -
duration(int | None)
-
-
返回
- MessageSegment
staticmethod file(file_key, file_name=None)
-
参数
-
file_key(str) -
file_name(str | None)
-
-
返回
- MessageSegment
staticmethod folder(file_key, file_name)
-
参数
-
file_key(str) -
file_name(str)
-
-
返回
- MessageSegment
staticmethod sticker(file_key)
-
参数
file_key(str)
-
返回
- MessageSegment
method to_content()
-
说明: 转换为发送时的消息内容,省略未设置和仅接收时存在的字段,不修改消息段本身。
-
参数
empty
-
返回
- dict[str, Any]
method to_post()
-
说明: 转换为富文本(post)消息节点,不修改消息段本身。富文本不支持该消息段时抛出
ValueError。 -
参数
empty
-
返回
- dict[str, Any]
class Text(<auto>)
-
说明: Text(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class At(<auto>)
-
说明: At(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class Image(<auto>)
-
说明: Image(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class InteractiveHeaderTitle(<auto>)
-
参数
auto
class InteractiveHeader(<auto>)
-
参数
auto
class InteractiveConfig(<auto>)
-
参数
auto
class Interactive(<auto>)
-
参数
auto
class InteractiveTemplate(<auto>)
-
说明: InteractiveTemplate(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class ShareChat(<auto>)
-
说明: ShareChat(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class ShareUser(<auto>)
-
说明: ShareUser(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class Audio(<auto>)
-
说明: Audio(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class Media(<auto>)
-
说明: Media(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class File(<auto>)
-
说明: File(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class Folder(<auto>)
-
说明: Folder(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class Sticker(<auto>)
-
说明: Sticker(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class PostMessageNode(<auto>)
-
参数
auto
class PostMessageNodeStylable(<auto>)
-
参数
auto
class PostText(<auto>)
-
参数
auto
class PostA(<auto>)
-
参数
auto
class PostAt(<auto>)
-
参数
auto
class PostImg(<auto>)
-
参数
auto
class PostMedia(<auto>)
-
参数
auto
class PostEmotion(<auto>)
-
参数
auto
class Post(<auto>)
-
说明: Post(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class System(<auto>)
-
说明: System(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class SystemDivider(<auto>)
-
说明: SystemDivider(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class Location(<auto>)
-
说明: Location(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class VideoChat(<auto>)
-
说明: VideoChat(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class Todo(<auto>)
-
说明: Todo(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class Vote(<auto>)
-
说明: Vote(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class Hongbao(<auto>)
-
说明: Hongbao(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class ShareCalendarEvent(<auto>)
-
说明: ShareCalendarEvent(type: str, data: dict[str, typing.Any] = )
-
参数
auto
class Calendar(<auto>)
-
参数
auto
class GeneralCalendar(<auto>)
-
参数
auto
class Message(<auto>)
-
说明: 飞书 协议 Message 适配。
-
参数
auto
classmethod get_segment_class()
-
参数
empty
-
返回
- type[MessageSegment]
method serialize()
-
参数
empty
-
返回
- tuple[str, str]
staticmethod deserialize(content, mentions, message_type)
-
参数
-
content(str) -
mentions(list[Mention] | None) -
message_type(str)
-
-
返回
- Message
method extract_plain_text()
-
参数
empty
-
返回
- str