Skip to content

An Implementation of NTQQ Protocol, with Pure C#, Derived from Konata.Core

License

Notifications You must be signed in to change notification settings

x-dr/Lagrange.Core

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Lagrange.Core

Core OneBot C# C#

License QQ

An Implementation of NTQQ Protocol, with Pure C#, Derived from Konata.Core

Disclaimer

The Lagrange.Core project, including its developers, contributors, and affiliated individuals or entities, hereby explicitly disclaim any association with, support for, or endorsement of any form of illegal behavior. This disclaimer extends to any use or application of the Lagrange.Core project that may be contrary to local, national, or international laws, regulations, or ethical guidelines.

Lagrange.Core is an open-source software project designed to facilitate lawful and ethical applications in its intended use cases. It is the responsibility of each user to ensure that their usage of Lagrange.Core complies with all applicable laws and regulations in their jurisdiction.

The developers and contributors of Lagrange.Core assume no liability whatsoever for any actions taken by users that violate the law or engage in any form of illicit activity. Users are solely responsible for their own actions and any consequences that may arise from the use of Lagrange.Core.

Furthermore, any discussions, suggestions, or guidance provided by the Lagrange.Core community, including its developers, contributors, and users, should not be interpreted as legal advice. It is strongly recommended that users seek independent legal counsel to understand the legal implications of their actions and ensure compliance with the relevant laws and regulations.

By using or accessing Lagrange.Core, the user acknowledges and agrees to release the developers, contributors, and affiliated individuals or entities from any and all liability arising from the use or misuse of the project, including any legal consequences incurred as a result of their actions.

Please use Lagrange.Core responsibly and in accordance with the law.

Features List

Protocol Support Login Support Messages Support Operations Support Events Support
Windows 🟒 QrCode 🟒 Images 🟒 Poke πŸ”΄ Captcha 🟒
macOS 🟒 Password 🟒 Text / At 🟒 Recall 🟑 BotOnline 🟒
Linux 🟒 EasyLogin 🟒 Records πŸ”΄ Leave Group 🟒 BotOffline 🟒
UnusalDevice
Password
πŸ”΄ QFace 🟒 Special Title πŸ”΄ Message 🟒
UnusalDevice
Easy
🟒 Json 🟑 Kick Member 🟒 Poke πŸ”΄
NewDeviceVerify πŸ”΄ Xml 🟒 Mute Member 🟒 MessageRecall πŸ”΄
Forward 🟒 Set Admin 🟒 GroupMemberDecrease 🟒
Video πŸ”΄ Friend Request πŸ”΄ GroupMemberIncrease 🟒
Flash Image πŸ”΄ Group Request πŸ”΄ GroupPromoteAdmin 🟒
Reply 🟒 Voice Call πŸ”΄ GroupInvite 🟒
File 🟑 Client Key 🟒 GroupRequestJoin πŸ”΄
Cookies 🟒 FriendRequest πŸ”΄
Send Message 🟒 FriendTyping πŸ”΄
FriendVoiceCall πŸ”΄

Lagrange.OneBot

Implementation - OneBot v11

Message Segement
Message Segement Support
Text 🟒
Face 🟒
Image 🟒
Record πŸ”΄
Video πŸ”΄
At 🟒
Rps πŸ”΄
Dice πŸ”΄
Shake πŸ”΄
Poke πŸ”΄
Anonymous πŸ”΄
Share πŸ”΄
Contact πŸ”΄
Location πŸ”΄
Music πŸ”΄
Reply πŸ”΄
Forward πŸ”΄
Node πŸ”΄
Xml πŸ”΄
Json πŸ”΄
API
API Support
/send_private_msg πŸ”΄
/send_group_msg πŸ”΄
/send_msg 🟒
/delete_msg πŸ”΄
/get_msg πŸ”΄
/get_forward_msg πŸ”΄
/send_like πŸ”΄
/set_group_kick 🟒
/set_group_ban 🟒
/set_group_anonymous_ban πŸ”΄
/set_group_whole_ban 🟒
/set_group_admin 🟒
/set_group_anonymous πŸ”΄
/set_group_card 🟒
/set_group_name 🟒
/set_group_leave 🟒
/set_group_special_title πŸ”΄
/set_friend_add_request πŸ”΄
/set_group_add_request πŸ”΄
/get_login_info 🟒
/get_stranger_info πŸ”΄
/get_friend_list πŸ”΄
/get_group_info 🟒
/get_group_list 🟒
/get_group_member_info πŸ”΄
/get_group_member_list πŸ”΄
/get_group_honor_info πŸ”΄
/get_cookies πŸ”΄
/get_csrf_token πŸ”΄
/get_credentials πŸ”΄
/get_record πŸ”΄
/get_image πŸ”΄
/can_send_image πŸ”΄
/can_send_record πŸ”΄
/get_status πŸ”΄
/get_version_info 🟒
/set_restart πŸ”΄
/clean_cache πŸ”΄
Event
PostType EventName Support
Message Private Message πŸ”΄
Message Group Message 🟒
Notice Group File Upload πŸ”΄
Notice Group Admin Change πŸ”΄
Notice Group Member Decrease πŸ”΄
Notice Group Member Increase πŸ”΄
Notice Group Mute πŸ”΄
Notice Friend Add πŸ”΄
Notice Group Recall Message πŸ”΄
Notice Friend Recall Message πŸ”΄
Notice Group Poke πŸ”΄
Notice Group red envelope luck king πŸ”΄
Notice Group Member Honor Changed πŸ”΄
Request Add Friend Request πŸ”΄
Request Group Request/Invitations πŸ”΄
Meta LifeCycle 🟒
Meta Heartbeat 🟒
Communication
CommunicationType Support
Http πŸ”΄
Http-Post 🟒
ForwardWebSocket 🟒
ReverseWebSocket 🟒

appsettings.json Example

{
    "Logging": {
        "LogLevel": {
            "Default": "Trace",
            "Microsoft": "Warning",
            "Microsoft.Hosting.Lifetime": "Information"
        }
    },
    "AccessToken": "",
    "Account": {
        "Uin": 0,
        "Password": "",
        "Protocol": "Linux",
        "AutoReconnect": true,
        "GetOptimumServer": true
    },
    "Implementation": {
        "ForwardWebSocket": {
            "Port": 8081,
            "HeartBeatIntetval": 5000
        },
        "ReverseWebSocket": {
            "Host": "127.0.0.1",
            "Port": 8080,
            "Suffix": "/onebot/v11/ws",
            "ReconnectInterval": 5000,
            "HeartBeatInterval": 5000
        },
        "Http": {
            "Host": "",
            "Port": 0,
            "EventEnabled": false
        },
        "HttpPost": {
            "Host": "127.0.0.1",
            "Port": 8080,
            "Suffix": "/onebot/v11/http",
            "Timeout": 0
        }
    }
}
  • Create a file named 'appsettings.json' under Lagrange.OneBot executable directory
  • As the Password is empty here, this indicates that QRCode login is used
  • After the QRCode Login, write Uin back to perform EasyLogin

Known Problem

- [ ] Signature Service is currently not established, so the login tend to be failed and return code may be 45, you can establish your own sign service by rewriting the Signature static class.

Thanks KonataDev/TheSnowfield for Provision of Signature API

  • Signature of Windows and macOS is missing, you need to figure out by your self

About

An Implementation of NTQQ Protocol, with Pure C#, Derived from Konata.Core

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%