/// <summary> /// 回复组消息 /// </summary> /// <param name="message"></param> /// <returns></returns> public Task <int> ReplyGroup(string message) { if (GroupInfo != null) { return(Mirai.SendGroupMessageAsync(GroupInfo.Id, message.ToMessage())); } else { return(null); } }
/// <summary> /// 回复组消息 /// </summary> /// <param name="urls"></param> /// <returns></returns> public async Task <int> ReplyGroupImg(Stream imageStream) { //MessageChain ImageMessage message = await Mirai.UploadPictureAsync(UploadTarget.Group, imageStream); //ImageMessage message = new ImageMessage(null, null, "data/net.mamoe.mirai-api-http/images/80245079ab39489f993f31b0a2b85676.jpeg"); //message.Path = null; //message.ImageId = message.ImageId.Replace("jpeg", "mirai").Replace("jpg", "mirai"); imageStream.Dispose(); if (GroupInfo != null) { return(await Mirai.SendGroupMessageAsync(GroupInfo.Id, message)); } else { return(0); } }