MCPcopy
hub / github.com/nonebot/nonebot2 / send

Method send

nonebot/internal/adapter/bot.py:180–193  ·  view source on GitHub ↗

调用机器人基础发送消息接口 参数: event: 上报事件 message: 要发送的消息 kwargs: 任意额外参数

(
        self,
        event: "Event",
        message: "str | Message | MessageSegment",
        **kwargs: Any,
    )

Source from the content-addressed store, hash-verified

178
179 @abc.abstractmethod
180 async def send(
181 self,
182 event: "Event",
183 message: "str | Message | MessageSegment",
184 **kwargs: Any,
185 ) -> Any:
186 """调用机器人基础发送消息接口
187
188 参数:
189 event: 上报事件
190 message: 要发送的消息
191 kwargs: 任意额外参数
192 """
193 raise NotImplementedError
194
195 @classmethod
196 def on_calling_api(cls, func: T_CallingAPIHook) -> T_CallingAPIHook:

Callers 14

send_textMethod · 0.45
send_bytesMethod · 0.45
send_textMethod · 0.45
send_bytesMethod · 0.45
send_textMethod · 0.45
send_bytesMethod · 0.45
handle_echoFunction · 0.45
websocket_echoFunction · 0.45
test_preprocessorFunction · 0.45
test_postprocessorFunction · 0.45
_handle_wsFunction · 0.45
background_taskFunction · 0.45

Calls

no outgoing calls

Tested by 6

test_preprocessorFunction · 0.36
test_postprocessorFunction · 0.36
_handle_wsFunction · 0.36
background_taskFunction · 0.36
test_websocket_clientFunction · 0.36