https://github.com/telsav/smartqq
a cross platform web-qq client
https://github.com/telsav/smartqq
asp-net-core chat-bot chat-client chatbot netcore qq smartqq webqq
Last synced: 8 months ago
JSON representation
a cross platform web-qq client
- Host: GitHub
- URL: https://github.com/telsav/smartqq
- Owner: telsav
- License: mit
- Created: 2017-08-22T13:12:14.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-24T11:27:32.000Z (almost 9 years ago)
- Last Synced: 2025-03-22T18:11:34.586Z (about 1 year ago)
- Topics: asp-net-core, chat-bot, chat-client, chatbot, netcore, qq, smartqq, webqq
- Language: C#
- Homepage:
- Size: 1.46 MB
- Stars: 26
- Watchers: 2
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SmartQQ
## 采用.NET CORE可运行在 Linux 、 Windows 和 Mac OSX 平台下。
# 效果如下图:
-----------------
| **`Linux CPU`** | **`Linux GPU`** | **`Mac OS CPU`** | **`Windows CPU`** | **`Android`** |
|-----------------|---------------------|------------------|-------------------|---------------|
| [](https://github.com/WangCharlie/SmartQQ) | [](https://github.com/WangCharlie/SmartQQ) | [](https://github.com/WangCharlie/SmartQQ) | [](https://github.com/WangCharlie/SmartQQ) | [](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();
```
# 引用
https://github.com/TJYSunset/DumbQQ
https://github.com/scienjus/smartqq
# 类似项目
https://github.com/rmbadmin/DumbQQ-Core
# 欢迎提交issue