<好腻害欸>
cyl18 / chaldene Goto Github PK
View Code? Open in Web Editor NEWThis project forked from mirai-net-shelter/mirai.net
Chaldene是Mirai.Net的修改版fork, 是基于mirai-api-http实现的轻量级mirai社区sdk。
License: GNU Affero General Public License v3.0
This project forked from mirai-net-shelter/mirai.net
Chaldene是Mirai.Net的修改版fork, 是基于mirai-api-http实现的轻量级mirai社区sdk。
License: GNU Affero General Public License v3.0
如题,找了半天没找到
#region 群内消息过长处理
if (args.BotPermission != Chaldene.Data.Shared.Permissions.Member)
{
//转发消息主体
ForwardMessage forwardMessage = new ForwardMessage();
//转发消息节点
List<ForwardNode> lstForwardNode = new List<ForwardNode>();
//时间戳,我这里直接固定了
string time = "1674503558";
string botName = "智能机甲";
lstForwardNode.Add(new ForwardNode
{
SenderId = sender.QQ,
SenderName = botName,
Time = time,
MessageChain = new MessageChainBuilder().Plain("消息过长,已自动变成转发消息").Build()
});
bool where1 = reviceMsg.Count() >= 300;
bool where2 = args.MessageChain.Where(a => a.Type == Messages.Image).Count() >= 2;
if (where1 || where2)
{
//添加转发消息节点
lstForwardNode.Add(new ForwardNode
{
SenderId = args.Sender.Id,
SenderName = args.Sender.Name,
Time = time,
MessageChain = args.MessageChain
});
//给主体赋值
forwardMessage.NodeList = lstForwardNode;
await args.RecallAsync();
//发送
await args.SendMessageAsync(forwardMessage);
}
}
#endregion
Chaldene.Data.Exceptions.InvalidResponseException
HResult=0x80131500
Message=原因: 错误的访问
备注: url=http://xxxxx:xxx/mute
payload={
"target": {
"Id": "588504056"
},
"memberId": {
"Id": "1075858260"
},
"time": 60
}
Source=Chaldene
StackTrace:
在 Chaldene.Sessions.MiraiBot.EnsureSuccess(String json, String appendix)
在 Chaldene.Sessions.MiraiBot.<PostJsonAsync>d__255.MoveNext()
在 Chaldene.Sessions.MiraiBot.<PostJsonAsync>d__256.MoveNext()
在 Chaldene.Sessions.MiraiBot.<MuteAsync>d__22.MoveNext()
在 Program.<>c__DisplayClass0_0.<<<Main>$>b__1>d.MoveNext() 在 D:\Work\2023\liuningBot\Program.cs 中: 第 99 行
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.