All Projects → Quan666 → ELFChatBot

Quan666 / ELFChatBot

Licence: GPL-3.0 license
闲聊QQ机器人,也就是人工智障

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ELFChatBot

Mtrans
Multi-source Translation
Stars: ✭ 711 (+1065.57%)
Mutual labels:  baidu, tencent
Yavipcore
Net Core Music Interface
Stars: ✭ 1,095 (+1695.08%)
Mutual labels:  baidu, qq
Web Oauth App
第三方登录服务 Web OAuth 示例
Stars: ✭ 30 (-50.82%)
Mutual labels:  baidu, qq
React Native Qqsdk
A React Native wrapper around the Tencent QQ SDK for Android and iOS. Provides access to QQ ssoLogin, QQ Sharing, QQZone Sharing etc
Stars: ✭ 100 (+63.93%)
Mutual labels:  tencent, qq
nonebot-plugin
一些 NoneBot 即开即用、良好兼容的插件——自定义表情包、早晚安、Vtuber今日运势等
Stars: ✭ 101 (+65.57%)
Mutual labels:  qq, cqhttp
Translators
🌏🌍🌎Translators🌎🌍🌏 is a library which aims to bring free, multiple, enjoyable translation to individuals and students in Python. Translators是一个旨在用Python为个人和学生带来免费、多样、愉快翻译的库。
Stars: ✭ 295 (+383.61%)
Mutual labels:  baidu, tencent
L Passport
Koa middleware and api sdk for wechat oauth, qq oauth, baidu oauth and weibo oauth
Stars: ✭ 52 (-14.75%)
Mutual labels:  baidu, qq
Coolq Http Api
为 酷Q 提供通过 HTTP 或 WebSocket 接收事件和调用 API 的能力
Stars: ✭ 1,787 (+2829.51%)
Mutual labels:  qq, cqhttp
GreenOnions
一个Mirai的QQ机器人, 实现了搜图, RSS订阅转发, 根据PixivID下载原图, 翻译, setu等功能
Stars: ✭ 109 (+78.69%)
Mutual labels:  cqhttp, cqhttp-mirai
ABot-Graia
一个使用 Graia Ariadne 搭建的 QQ 功能性机器人。
Stars: ✭ 194 (+218.03%)
Mutual labels:  tencent, qq
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 589 (+865.57%)
Mutual labels:  tencent, qq
Shiro
基于OneBot协议的QQ机器人快速开发框架
Stars: ✭ 78 (+27.87%)
Mutual labels:  qq, cqhttp
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 294 (+381.97%)
Mutual labels:  tencent, qq
Chord
Chord - A Modern Music Player
Stars: ✭ 615 (+908.2%)
Mutual labels:  baidu, qq
qqmessageoutput
安卓QQ聊天记录导出
Stars: ✭ 100 (+63.93%)
Mutual labels:  tencent, qq
Socialite
Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, you can easily use it without Laravel.
Stars: ✭ 1,026 (+1581.97%)
Mutual labels:  baidu, qq
Go-Mirai-Client
基于MiraiGo的客户端,使用反向 websocket 收发私聊、群聊消息,消息格式类似onebot。支持多账号,很稳定
Stars: ✭ 90 (+47.54%)
Mutual labels:  qq, cqhttp
Decryptlogin
APIs for loginning some websites by using requests.
Stars: ✭ 1,861 (+2950.82%)
Mutual labels:  baidu, tencent
LeXun.Security.OAuth
用于 Asp.Net 和 Asp.Net Core 的OAuth2社交身份验证提供程序。支持支付宝,QQ,微信,百度等第三方登录
Stars: ✭ 19 (-68.85%)
Mutual labels:  baidu, qq
coolq-php-sdk
coolq-php-sdk
Stars: ✭ 23 (-62.3%)
Mutual labels:  qq, cqhttp

ELFChatBot

Codacy Badge

这是一个闲聊机器人,基于 Nonebot2
接入了腾讯和百度的闲聊 api,百度的api支持连续对话
可以实现群聊、私聊,同时随机回复群聊消息。

效果图:

image-20210114125523902

娱乐功能

  1. 随机回复群友消息
  2. 伪造转发合并消息(fake、fakes触发,具体使用看代码)

申请密钥

  1. 百度大脑平台(推荐使用!)

    https://ai.baidu.com/unit/home 注册并创建机器人,设置好机器人技能(至少包含闲聊),得到机器人id(S开头)、api_keysecret_key

    注意:默认优先使用百度

  2. 腾讯开放平台(推荐作为备用也申请一个) 失效了

    前往 https://ai.qq.com/console/capability/detail/8 注册并创建应用,并在能力库接入 智能闲聊,得到 app_id 以及 app_key

部署

注意:Python 3.7+

一 、配置 QQ 协议端

目前支持的协议有:

QQ 协议端举例:

这里以 go-cqhttp为例

  1. 下载 go-cqhttp 对应平台的 release 文件,点此前往

  2. 运行 exe 文件或者使用 ./go-cqhttp 启动

  3. 生成默认配置文件并修改默认配置

    {
     "uin": 你的QQ号,
     "password": "你的密码",
     "encrypt_password": false,
     "password_encrypted": "",
     "enable_db": true,
     "access_token": "",
     "relogin": {
       "enabled": true,
       "relogin_delay": 3,
       "max_relogin_times": 0
     },
     "_rate_limit": {
       "enabled": false,
       "frequency": 0,
       "bucket_size": 0
     },
     "ignore_invalid_cqcode": false,
     "force_fragmented": true,
     "heartbeat_interval": 0,
     "http_config": {
       "enabled": true,
       "host": "0.0.0.0",
       "port": 5700,
       "timeout": 0,
       "post_urls": {}
     },
     "ws_config": {
       "enabled": true,
       "host": "0.0.0.0",
       "port": 6700
     },
     "ws_reverse_servers": [
       {
         "enabled": true,
         "reverse_url": "ws://127.0.0.1:8080/cqhttp/ws",
         "reverse_api_url": "",
         "reverse_event_url": "",
         "reverse_reconnect_interval": 3000
       }
     ],
     "post_message_format": "string",
     "use_sso_address": false,
     "debug": false,
     "log_level": "",
     "web_ui": {
       "enabled": true,
       "host": "0.0.0.0",
       "web_ui_port": 9999,
       "web_input": false
     }
    }

    其中 ws://127.0.0.1:8080/cqhttp/ws 中的 127.0.0.18080 应分别对应 nonebot 配置的 HOST 和 PORT

    其中以下配置项务必按照下方样式修改!

    "ws_reverse_servers": [
        {
          "enabled": true,
          "reverse_url": "ws://127.0.0.1:8080/cqhttp/ws",
          "reverse_api_url": "",
          "reverse_event_url": "",
          "reverse_reconnect_interval": 3000
        }
      ],
    1. 再次运行 exe 文件或者使用 ./go-cqhttp 启动

二、部署聊天插件

第一次部署

  1. 下载代码到本地

  2. 参照 ELF_RSS 2.0的部署方式

  3. 运行 pip install -r requirements.txt

  4. 请按照 注释 修改配置文件 (文件 .env.prod

  5. 运行 nb run

  6. 收到机器人发送的启动成功消息

从 Nonebot1 到 NoneBot2

  1. 卸载 nonebot1

    pip uninstall nonebot
  2. 运行

    pip install -r requirements.txt
    
  3. 参照 第一次部署

已经部署过其它 Nonebot2 机器人

  1. 下载 项目文件夹 src/plugins/ELFChatBot 复制 到你部署好了的机器人 plugins 目录
  2. 下载 requirements.txt 文件,并运行 pip install -r requirements.txt
  3. 第一次部署 一样,修改配置文件
  4. 运行 nb run
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].