(self, event: Event, message: Message_T,
                   **kwargs)
return await self.send_msg(**params)
向触发事件的主体发送消息。

        ``event`` 参数为事件对象，``message`` 参数为要发送的消息。可额外传入 ``at_sender``
        命名参数用于控制是否 at 事件的触发者，默认为 `False`。其它命名参数作为
        OneBot API ``send_msg`` 的参数直接传递。
向触发事件的主体发送消息。
向触发事件的主体发送消息。
async def send(self, event: Event, message: Message_T,
                   **kwargs) -> Optional[Dict[str, Any]]:
        """
        向触发事件的主体发送消息。

        ``event`` 参数为事件对象，``message`` 参数为要发送的消息。可额外传入 ``at_sender``
        命名参数用于控制是否 at 事件的触发者，默认为 `False`。其它命名参数作为
        OneBot API ``send_msg`` 的参数直接传递。
        """
        msg = message if isinstance(message, Message) else Message(message)
        await run_async_funcs(self._before_sending_funcs, event, msg, kwargs)

        at_sender = kwargs.pop('at_sender', False) and ('user_id' in event)

        keys = {'message_type', 'user_id', 'group_id', 'discuss_id'}
        params = {k: v for k, v in event.items() if k in keys}
        params['message'] = msg
        params.update(kwargs)

        if 'message_type' not in params:
            if 'group_id' in params:
                params['message_type'] = 'group'
            elif 'discuss_id' in params:
                params['message_type'] = 'discuss'
            elif 'user_id' in params:
                params['message_type'] = 'private'

        if at_sender and params['message_type'] != 'private':
            params['message'] = MessageSegment.at(params['user_id']) + \
                                MessageSegment.text(' ') + params['message']

        return await self.send_msg(**params)
async def send ( self , event : Event , message : Message_T , * * kwargs ) -> Optional [ Dict [ str , Any ] ] : msg = message if isinstance ( message , Message ) else Message ( message ) await run_async_funcs ( self . _before_sending_funcs , event , msg , kwargs ) at_sender = kwargs . pop ( 'at_sender' , False ) and ( 'user_id' in event ) keys = { 'message_type' , 'user_id' , 'group_id' , 'discuss_id' } params = { k : v for k , v in event . items ( ) if k in keys } params [ 'message' ] = msg params . update ( kwargs ) if 'message_type' not in params : if 'group_id' in params : params [ 'message_type' ] = 'group' elif 'discuss_id' in params : params [ 'message_type' ] = 'discuss' elif 'user_id' in params : params [ 'message_type' ] = 'private' if at_sender and params [ 'message_type' ] != 'private' : params [ 'message' ] = MessageSegment . at ( params [ 'user_id' ] ) + MessageSegment . text ( ' ' ) + params [ 'message' ] return await self . send_msg ( * * params )