• This repository has been archived on 19/Oct/2023
  • Stars
    star
    26
  • Rank 902,507 (Top 19 %)
  • Language
    C#
  • License
    GNU General Publi...
  • Created almost 4 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Android QQ protocol core implementation written in C#

Konata.Core

Core C# NuGet
NuGet License Build Telegram

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

Docs

įŽ€äŊ“中文 / English

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 🟡1 BotOnline đŸŸĸ
Records đŸŸĸ Leave Group đŸŸĸ BotOffline đŸŸĸ
QFace đŸŸĸ Special Title đŸŸĸ Message 🟡2
Json đŸŸĸ Kick Member đŸŸĸ Poke đŸŸĸ
Xml đŸŸĸ Mute Member đŸŸĸ MessageRecall đŸŸĸ
Forward 🟡3 Set Admin đŸŸĸ GroupMemberDecrease đŸŸĸ
Video 🔴 Friend Request đŸŸĸ GroupMemberIncrease đŸŸĸ
Flash Image đŸŸĸ Group Request đŸŸĸ GroupPromoteAdmin đŸŸĸ
Reply đŸŸĸ Voice Call 🔴 GroupInvite đŸŸĸ
File 🔴 Csrf Token đŸŸĸ GroupRequestJoin đŸŸĸ
Cookies 🔴 FriendRequest đŸŸĸ
FriendTyping đŸŸĸ
FriendVoiceCall 🔴

Special Thanks

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

License

Licensed in GNU GPLv3 with ❤.

Footnotes

  1. Not supported to recall messages sent from the bot. ↩

  2. Not supported temp messages. ↩

  3. Not supported to forward messages between group and friend. ↩