Giter VIP home page Giter VIP logo

dumbqq's Issues

求教:隔几个小时后给好友发送消息时报错(调试时,发现retcode返回是100012)

public void Message(TargetType type, long id, string content)这个方法里面的这句话
var status = JObject.Parse(response.RawText)["errCode"].ToObject<int?>()
我开了控制台程序,并且登录成功了webqq,但隔了几个小时候,我再发送一条消息,执行Message方法,但上面这句代码报未将对象引用到对象实例。我调试看了下,response.RawText并没有errCode的字段了,只有retcode字段,且retcode字段的值是100012.
我不明白返回100012后该怎么做。也不明白返回100012的意思,求教!

修复Start()的cookie登录重载

问题描述:Cookie登录功能不可用。
问题原因:这个方法没有加载ptwebqq, vfwebqq, uin, psessionidhash五个参数。

报错

欢迎,绿砖!
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("什么事?");

缓存文件登录相关问题

通过缓存文件登录失败(返回100012错误)后,如果不清除掉缓存,直接正常步骤(通过扫二维码)登陆,会在GetUinAndPsessionid()步骤失败,也返回100012错误,

退出程序删除缓存文件(默认是“dump.json”)再运行,又可以正常登陆

已在你的项目基础上做了封装

地址:
https://github.com/WangCharlie/SmartQQ

SmartQQClient
                // 登录
                .Login((bytes) =>
                {
                    using (var ms = new MemoryStream(bytes))
                    {
                        SmartQQClient.ConsoleWriteImage(new Bitmap(Image.FromStream(ms)));
                        Logger.Instance.Info("二维码已打印在屏幕,请使用手机QQ扫描。");
                    }
                })
                // 好友消息回调
                .ReceivedFriendMessage((message) => {
                    message.Reply("test");
                    Logger.Instance.Info($"{message.Sender.Alias ?? message.Sender.Nickname}:{message.Content}");
                })
                // 群消息回调
                .ReceivedGroupMessage((message) => {
                    Logger.Instance.Info(
                    $"[{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("什么事?");
                })
                // 讨论组消息回调
                .ReceivedDiscussionMessage((message) =>
                {
                    Logger.Instance.Info($"[{message.Discussion.Name}]{message.Sender.Nickname}:{message.Content}");
                })
                // 消息回显
                .ReceivedMessageEchoEventArgs((e) => {
                    Logger.Instance.Info($"{e.Target.Name}>{e.Content}");
                })
                //开始服务
                .Start((client) => {
                    Logger.Instance.Info($"欢迎,{client.Nickname}!");
                });

            Console.ReadLine();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.