/// <summary> /// 返回当前消息链的适用于发送形式, 去除仅用于接收的消息元素, 即去除了 <see cref="Source" /> 和 <see cref="Quote" /> /// </summary> /// <param name="chain">原链</param> /// <returns>包含不便发送元素的新链</returns> public static MessageChain AsSendable(this MessageChain chain) { return(new(chain.Where(x => !(x is Source) && !(x is Quote)))); }
/// <summary> /// 返回当前消息链的可读形式, 即去除了 <see cref="Source" /> 元素 /// </summary> /// <param name="chain">原链</param> /// <returns>不包含不便于程序阅读元素的新链</returns> public static MessageChain AsReadable(this MessageChain chain) { return(new(chain.Where(x => !(x is Source)))); }