2394425147 / Konata.Core

QQ(Android) protocol core implemented with pure C#.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Konata.Core

Core C# NuGet
NuGet License Build

QQ(Android) protocol core implemented with pure C#
based on .net standard 2.1, event driven.

Docs

Example code snippets
// Create a bot instance
var bot = BotFather.Create(config, device, keystore);
{
    // Handle the captcha
    bot.OnCaptcha += (bot, e) =>
    {
        if(e.Type == CaptchaType.Slider)
        {
            Console.WriteLine(e.SliderUrl); 
            bot.SubmitSliderTicket(Console.ReadLine());
        }
        else if(e.Type == CaptchaType.Sms)
        {
            Console.WriteLine(e.Phone); 
            bot.SubmitSmsCode(Console.ReadLine());
        }
    };

    // Print the log
    bot.OnLog += (_, e) 
        => Console.WriteLine(e.EventMessage);

    // Handle group messages
    bot.OnGroupMessage += (_, e) 
        => Console.WriteLine(e.Message); 
    
    // Handle friend messages
    bot.OnFriendMessage += (_, e) 
        => Console.WriteLine(e.Message);
    
    // ... More handlers
}

// Do login
if(!await bot.Login())
{
    Console.WriteLine("Login failed");
    return;
}

Console.WriteLine("We got online!");

Features List

Messages Support Operations Support Events Support
Images 🟒 Poke 🟒 Captcha 🟒
Text / At 🟒 Recall 🟑[2] BotOnline 🟒
Records 🟒 Leave Group 🟒 BotOffline 🟒
QFace 🟒 Special Title 🟒 Message 🟑[3]
Json 🟒 Kick Member 🟒 Poke 🟒
Xml 🟒 Mute Member 🟒 MessageRecall 🟒
Forward 🟑[1] Set Admin 🟒 GroupMemberDecrease 🟒
Video πŸ”΄ Friend Request 🟒 GroupMemberIncrease 🟒
Flash Image 🟒 Group Request 🟒 GroupPromoteAdmin 🟒
Reply 🟒 Voice Call πŸ”΄ GroupInvite 🟒
File πŸ”΄ Csrf Token 🟒 GroupRequestJoin 🟒
Cookies πŸ”΄ FriendRequest 🟒
FriendTyping 🟒
FriendVoiceCall πŸ”΄

[1]: Not supported to forward messages between group and friend.
[2]: Not supported to recall messages sent from the bot.
[3]: Not supported temp messages.

Special Thanks

Special thanks to JetBrains offers free open-source licenses for us!

License

Licensed in GNU GPLv3 with ❀.

About

QQ(Android) protocol core implemented with pure C#.

License:GNU General Public License v3.0


Languages

Language:C# 100.0%