MCPcopy
hub / github.com/AstrBotDevs/AstrBot / send_im_message

Function send_im_message

astrbot/dashboard/api/open_api.py:300–311  ·  view source on GitHub ↗
(
    payload: ImMessageRequest,
    _auth: AuthContext = Depends(require_im_scope),
    service: OpenApiService = Depends(get_service),
)

Source from the content-addressed store, hash-verified

298
299@router.post("/im/messages")
300async def send_im_message(
301 payload: ImMessageRequest,
302 _auth: AuthContext = Depends(require_im_scope),
303 service: OpenApiService = Depends(get_service),
304):
305 body = _model_dict(payload)
306 try:
307 await service.send_message(body)
308 except OpenApiServiceError as exc:
309 raise ApiError(str(exc)) from exc
310
311 return ok()
312
313
314@router.post("/im/message", include_in_schema=False)

Callers 1

send_im_message_aliasFunction · 0.85

Calls 4

ApiErrorClass · 0.90
okFunction · 0.90
_model_dictFunction · 0.70
send_messageMethod · 0.45

Tested by

no test coverage detected