olivos-team / olivos Goto Github PK
View Code? Open in Web Editor NEWOlivOS / Witness Union,一个强大的跨平台交互栈与机器人框架
Home Page: https://doc.olivos.wiki
License: GNU Affero General Public License v3.0
OlivOS / Witness Union,一个强大的跨平台交互栈与机器人框架
Home Page: https://doc.olivos.wiki
License: GNU Affero General Public License v3.0
使用QQ - 安卓手机或手表模式登录。登陆成功,加载群信息成功,版本是最新版本,log显示网络诊断未发现问题。
持续出现上传错误:
[2023-03-16 19:17:37] [WARNING]: 上报 Event 数据到 http://127.0.0.1:55001/OlivOSMsgApi/qq/onebot/gocqhttp 失败: Post "http://127.0.0.1:55001/OlivOSMsgApi/qq/onebot/gocqhttp": dial tcp 127.0.0.1:55001: connectex: No connection could be made because the target machine actively refused it. 将进行第 1 次重试
[2023-03-16 19:17:35] [WARNING]: 上报 Event 数据 {"post_type":"meta_event","meta_event_type":"heartbeat","time":1679019442,"self_id":1603367916,"status":{"app_enabled":true,"app_good":true,"app_initialized":true,"good":true,"online":true,"plugins_good":null,"stat":{"packet_received":46,"packet_sent":34,"packet_lost":0,"message_received":2,"message_sent":0,"disconnect_times":0,"lost_times":0,"last_message_time":1679019128}},"interval":5000}
骰子能捕捉到群消息,但是各种口令都无法使用。
L10N的文件暴露与扩展形式
私聊事件中调用send方法发送群聊消息时日志报错
go-cqhttp的dev分支新增参数如下:
# 在实例可能丢失(获取到的签名为空)时是否尝试重新注册
# 为 true 时,在签名服务不可用时可能每次发消息都会尝试重新注册并签名。
# 为 false 时,将不会自动注册实例,在签名服务器重启或实例被销毁后需要重启 go-cqhttp 以获取实例
# 否则后续消息将不会正常签名。关闭此项后可以考虑开启签名服务器端 auto_register 避免需要重启
auto-register: false
# 是否在 token 过期后立即自动刷新签名 token(在需要签名时才会检测到,主要防止 token 意外丢失)
# 独立于定时刷新
auto-refresh-token: false
# 定时刷新 token 间隔时间,单位为分钟, 建议 30~40 分钟, 不可超过 60 分钟
# 目前丢失token也不会有太大影响,可设置为 0 以关闭,推荐开启
refresh-interval: 40
auto-register
可以使签名服务端重启后,客户端重新获得注册。
目前qsign官方的config中,服务端自动刷新token的选项默认是开启,由于冲突,所以go-cqhttp的auto-register
需要为关闭。此项影响不大。
但是旧版本go-cqhttp不存在自动注册的机制,当服务端(qsign)不支持或客户端(go-cqhttp)版本低时,一旦服务端重启,则客户端也必须重启。
比较有用的是auto-refresh-token
参数以及refresh-interval
参数,用于自动刷新token,此项可以防止token过期导致的消息无法发送等症状。
由于当以上配置为不存在时,会默认false
,因为无法修改auto-refresh-token
参数,自行修改会被启动器覆盖。
所以OlivOS目前不可以直接替换最新版本的dev分支的go-cqhttp的Action。
源码部署时,使用requirements文件安装依赖后无法正常启动框架
克隆源码后,使用requirements文件安装依赖,并启动框架。
Traceback (most recent call last):
File "/root/OlivOS/main.py", line 21, in
import OlivOS
File "/root/OlivOS/OlivOS/init.py", line 35, in
from . import flaskServerAPI
File "/root/OlivOS/OlivOS/flaskServerAPI.py", line 18, in
from flask import Flask
File "/root/miniconda3/envs/OlivOS/lib/python3.9/site-packages/flask/init.py", line 7, in
from .app import Flask as Flask
File "/root/miniconda3/envs/OlivOS/lib/python3.9/site-packages/flask/app.py", line 28, in
from . import cli
File "/root/miniconda3/envs/OlivOS/lib/python3.9/site-packages/flask/cli.py", line 18, in
from .helpers import get_debug_flag
File "/root/miniconda3/envs/OlivOS/lib/python3.9/site-packages/flask/helpers.py", line 16, in
from werkzeug.urls import url_quote
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/root/miniconda3/envs/OlivOS/lib/python3.9/site-packages/werkzeug/urls.py)
解决办法
通过搜索工具搜索相关内容,查询到Werkzeug 3.0.0删除了以前不推荐的代码,Flask没有正确指定依赖项。
指定Werkzeug为2.2.2后可以正常启动。
pip3 install Werkzeug==2.2.2
是否有更优雅的方式解决这个问题,或者是不是我的操作有问题?
No response
No response
Linux-Ubuntu22.04
python3.9及3.10均出现此问题
none
none
如题。
通过 plugin_event.data.sender["user_id"] 获取的用户 id 在qq平台下为 int 类型,而 dodo 中为 str 类型,建议进行统一
QQ 中 sender
字段内容
"sender": {
"nickname": "雨鸣于舟",
"age": 0,
"area": "",
"card": "",
"level": "",
"role": "owner",
"sex": "unknown",
"title": "Master",
"user_id": 16xxxx6761, // 这里是整形
"id": "16xxxx6761",
"name": "雨鸣于舟"
}
DODO 中 sender
字段内容
"sender": {
"nickname": "雨鸣于舟",
"user_id": "18xxxx785", // 这里是字符串
"id": "18xxxx785",
"name": "雨鸣于舟",
"sex": "unknown",
"age": 0
}
希望能在hackchatSDK中加入密码选项(password),方法是在join包中加入password字段,以获得一个tripcode(识别码)。这(tripcode)是在Hack.chat中唯二鉴别身份的方式(hash也可以,但hash基于IP计算,人们更倾向于使用tripcode)
一句废话,Hack.chat用户们很高兴有大佬给hc做了一个成熟的bot框架,希望您能和我们一起来交流:https://hc.thz.cool/?your-channel 或使用官方客户端 https://hack.chat/?your-channel
以及配套的动态组件管理机制
需要符合Mrs4s/go-cqhttp#1772 的修改
L10N采用更具有可读性的写法,现在的写法需要提供一个key,而不能在调用处看到英文原文:
self.log(2, OlivOS.L10NAPI.getText(
'pluginAPI_0014', [
plugin_models_dict_this['name'],
self.Proc_name
]
))
修改后可以在调用处看到英文原文,采用类似翻译的方法实现
self.log(2, OlivOS.L10NAPI.getTrans(
'OlivOS plugin [{0}] is loaded by OlivOS plugin shallow [{1}]', [
plugin_models_dict_this['name'],
self.Proc_name
],
'pluginAPI'
))
此处造成的效率损耗,需要后续开展工作来优化
Line 533 in 0c3a7a5
Describe the bug
当自定义帮助文档词条的词条名超过24个字符时,无法出现在模糊搜索的结果池中,仅在输入完整词条名时可以获得词条内容
To Reproduce
Expected behavior
期望返回以下内容:
已为你找到以下以下相似条目:
1.一二三四五六七八九十甲乙丙丁戊己庚辛壬癸子丑寅卯辰巳午未申酉
请输入序号以查看对应选项
Screenshots
Additional context
使用的版本:
[OlivaDice] - [Init] - 当前版本为[3.3.15(1065)]
欢迎使用 青果核心交互栈 OlivOS 0.11.9(129)
已在论坛和Issues中搜索,已查阅手册,暂未找到与遇到的问题有关的内容(手册里的HelpMode配置项已经失效)
发完才发现好像应该发到OlivaDiceCore那边
至于干啥要24+个字符那么长的条目名,是因为玩的规则没有全汉化所以存了一些生肉规则书英文名的词条,然而英文的话一下就超过24字符了orz
https://github.com/OlivOS-Team/OlivOS/blob/main/OlivOS/kaiheilaSDK.py#L478
此处代码需要参考discord模块的进行改进
baka
接入OAuthAPP
实现在平台处理PR、ISSUE等
一个GUI
多对象的管理
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.