Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

报错 #10

Open
OvidioLee opened this issue Jun 22, 2017 · 2 comments
Open

报错 #10

OvidioLee opened this issue Jun 22, 2017 · 2 comments

Comments

@OvidioLee
Copy link

OvidioLee commented Jun 22, 2017

欢迎,绿砖!
2017-06-22 19:05:33,023 ERROR [13] DumbQQClient Enzio-PC\Enzio - System.NullRefe
renceException: 未将对象引用设置到对象的实例。
在 DumbQQConsoleDemo.Program.<>c.

b__4_1(Object sender, GroupMessage mes
sage) 位置 C:\DumbQQ-master\DumbQQConsoleDemo\Program.cs:行号 79
在 DumbQQ.Client.DumbQQClient.PollMessage() 位置 C:\DumbQQ-master\DumbQQ\Clie
nt\DumbQQClient.cs:行号 779
在 DumbQQ.Client.DumbQQClient.b__111_0() 位置 C:\DumbQQ-mas
ter\DumbQQ\Client\DumbQQClient.cs:行号 734

79 -84行

 Console.WriteLine(
                $"[{message.Group.Name}]{message.Sender.Alias ?? message.Sender.Nickname}:{message.Content}");
            if (message.Content.IsMatch(@"^\s*Knock knock\s*$"))
                message.Reply("Who's there?");
            else if (message.StrictlyMentionedMe)
                message.Reply("什么事?");
@OvidioLee OvidioLee reopened this Jun 22, 2017
@OvidioLee OvidioLee reopened this Jun 22, 2017
@TJYSunset
Copy link
Owner

这个可能是消息主体没有任何能被API解析出的内容但又收到了消息导致的,换句话说其实是feature……大概。
或者我应该在文档注释里指出这一点?

@TJYSunset
Copy link
Owner

或者也有可能是获取群信息失败什么的,建议对所有属性都做下null check,如果还是有问题请让我知道。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants