ehforwarderbot / efb-qq-slave Goto Github PK
View Code? Open in Web Editor NEWEFB QQ Slave, a channel for EH Forwarder Bot. EFB QQ从端
License: GNU General Public License v3.0
EFB QQ Slave, a channel for EH Forwarder Bot. EFB QQ从端
License: GNU General Public License v3.0
def coolq_api_query(self, func_name, **kwargs):
""" # Do not call get_status too frequently
if self.check_running_status():
return self._coolq_api_wrapper(func_name, **kwargs)
"""
if self.is_logged_in and self.is_connected:
return self._coolq_api_wrapper(func_name, **kwargs)
elif self.repeat_counter < 3:
self.deliver_alert_to_master(self._('Your status is offline.\n'
'You may try login with /0_login'))
self.repeat_counter += 1
这个函数在未登陆时返回的是NULL.
而
def update_friend_list(self):
# Warning: Experimental API
self.friend_list = self.coolq_api_query('_get_friend_list')
self.logger.debug('Update friend list completed. Entries: %s', len(self.friend_list))
认为这个函数必然会有一个返回值
所以在未登录成功时调用/link 会导致抛出异常
bot_1 | File "/usr/local/lib/python3.6/site-packages/efb_qq_slave/Clients/CoolQ/CoolQ.py", line 580, in update_friend_list
bot_1 | self.logger.debug('Update friend list completed. Entries: %s', len(self.friend_list))
bot_1 | TypeError: object of type 'NoneType' has no len()
卡在处理中…
错误信息是
pkg_resources.ContextualVersionConflict: (h11 0.9.0 (/usr/local/lib/python3.6/dist-packages), Requirement.parse('h11~=0.8.1'), {'wsproto'})
应该是本地的版本号比较高
在进程中可以看见两个CQP.exe,但打开voNVC,voNVC就彻底卡死了。没办法多开
因为如果要加入语音支持的话,必须要替换酷Q原文件,感觉有点脏所以暂时不考虑实现。有需求的可以在下面提出。
可以启动,但是启动后很快就收到这个错误,因此我在 TG 上使用 /chat ,结果是没有任何事情发生。这会是什么问题?
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.6/site-packages/efb_qq_slave/__init__.py", line 81, in poll
self.init_client_manager()
File "/usr/local/lib/python3.6/site-packages/efb_qq_slave/__init__.py", line 72, in init_client_manager
self.QQClientMgr = ClientMgr(self.config['Client'], self.config, self)
File "/usr/local/lib/python3.6/site-packages/efb_qq_slave/ClientMgr.py", line 22, in __init__
self.client = cls(name, config, channel)
File "/usr/local/lib/python3.6/site-packages/efb_qq_slave/Clients/CoolQ/CoolQ.py", line 58, in __init__
self.coolq_bot = CQHttp(api_root=self.client_config['api_root'],
TypeError: string indices must be integers
服务器上的COOLQ能看见QQ发过来的消息,但是TG上的BOT没有显示;
TG的BOT发送消息,服务器上的COOLQ能看见BOT发过来的消息,QQ客户端也能看见。
efb都已重新卸载安装一遍,目前版本:
qq- slave:2.0.0a10
tg-master : 2.0.0b22
ebf : 2.0.0b15
更新到 2.0.0b1 之后出现的,会不停刷
/efb_qq_slave/Clients/CoolQ/Utils.py
def download_file_from_qzone
qun.qzone.qq.com
这个域名已经没了
自用的时候 写了docker-compose文件 https://github.com/Earth-Online/efb-qq-docker
可以添加到readme docker安装
如果群名片有奇怪字符, 会导致发送信息变成Unsupported characters
调查是哪个字符中
是┍ ⃢👁︵
真的是tg的不支持..
容器内 /coolq/data/image/ 中有 cqimg 文件,但 Telegram 端图片消息显示 [Download image failed, please check on your QQ client] 。
系统 Debian 8
CoolQ 配置
docker run -ti --rm --name cqhttp-test --net="host"
-v $(pwd)/coolq:/root/coolq # mount coolq folder
-p 9000:9000 # 网页noVNC端口
-p 5700:5700 # 酷Q对外提供的API接口的端口
-e VNC_PASSWD=******** # 请修改 VNC 密码!!!!
-e COOLQ_PORT=5700 # 酷Q对外提供的API接口的端口
-e COOLQ_ACCOUNT=******** # 在此输入要登录的QQ号,虽然可选但是建议填入
-e CQHTTP_POST_URL=http://127.0.0.1:8000 # efb-qq-slave监听的端口/地址 用于接受传入的消息
-e CQHTTP_SERVE_DATA_FILES=yes # 允许以HTTP方式访问酷Q数据文件
-e CQHTTP_ACCESS_TOKEN=ac0f790e1fb74ebcaf45da77a6f9de47 # Access Token
-e CQHTTP_POST_MESSAGE_FORMAT=array # 回传消息时使用数组(必选)
richardchien/cqhttp:latest
EFB配置
Client: CoolQ
CoolQ:
type: HTTP
access_token: ac0f790e1fb74ebcaf45da77a6f9de47
api_root: http://127.0.0.1:5700/
host: 127.0.0.1
port: 8000
is_pro: false
air_option:
upload_to_smms: true
报错信息为
yaml.scanner.ScannerError: mapping values are not allowed here
in "/root/.ehforwarderbot/profiles/default/milkice.qq/config.yaml", line 2, column 9
见上图
在启动miriai之后,出现两条[ERROR]信息为
[ERROR] [CQHTTPMirai] Exception in ReportService
[ERROR] [CQHTTPMirai] java.net.ConnectException: Failed to connect to
/127.0.0.1:8000
见上图
I cannot send messages to groups whether in unlinked chat with the bot, or the linked chat.
But I can see the messges from the groups, and can view/send messages with friends.
master有一个很好用的功能
链接聊天到群组后,输入/update_info后就可以修改改群组名称为从端获取到的name 以及 profile picture到群组信息中。十分方便。
而qq-slave会报:
Error occurred while update chat information.
'ETMChat' object has no attribute 'channel_id'
的错误,求大佬支持。谢谢
想要提供一个群文件下载功能.看了一下http api列表没有这个功能.如果用web群空间下载的话, 需要提供群号和文件id, 文件id可以在事件里找到. 作者有什么好办法优雅实现么
log:
2019-11-25 08:29:44,847 [INFO]: werkzeug (internal.log; internal.py:122)
192.168.44.1 - - [25/Nov/2019 08:29:44] "POST / HTTP/1.1" 200 -
2019-11-25 08:29:44,848 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2993)
('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS "t1" WHERE ("t1"."slave_uid" = ?)', ['milkice.qq private'])
2019-11-25 08:29:44,848 [DEBUG]: efb_telegram_master.slave_message (slave_message.get_slave_msg_dest; slave_message.py:247)
[b0805a8f-5218-4010-91ab-44c4dd4d2c94_50176_0] The message should deliver to blueset.telegram -
2019-11-25 08:29:44,849 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2993)
('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS "t1" WHERE ("t1"."master_uid" = ?)', ['blueset.telegram -*****'])
2019-11-25 08:29:44,849 [DEBUG]: efb_telegram_master.slave_message (slave_message.get_slave_msg_dest; slave_message.py:255)
[b0805a8f-5218-4010-91ab-44c4dd4d2c94_50176_0] Message is in chat <EFBChat: ***** (private) @ QQ Slave (Notification: ALL)>
2019-11-25 08:29:44,849 [DEBUG]: efb_telegram_master.slave_message (slave_message.get_slave_msg_dest; slave_message.py:268)
[b0805a8f-5218-4010-91ab-44c4dd4d2c94_50176_0] Message is sent to Telegram chat -, with header "".
2019-11-25 08:29:45,385 [DEBUG]: efb_telegram_master.slave_message (slave_message.slave_message_image; slave_message.py:393)
[b0805a8f-5218-4010-91ab-44c4dd4d2c94_50176_0] Message is of MsgType.Image type; Path: /tmp/tmpwk6_gxgj; MIME: image/jpeg
2019-11-25 08:29:45,385 [DEBUG]: efb_telegram_master.slave_message (slave_message.slave_message_image; slave_message.py:395)
[b0805a8f-5218-4010-91ab-44c4dd4d2c94_50176_0] Size of /tmp/tmpwk6_gxgj is 33076.
2019-11-25 08:29:46,620 [DEBUG]: efb_telegram_master.slave_message (slave_message.dispatch_message; slave_message.py:202)
[b0805a8f-5218-4010-91ab-44c4dd4d2c94_50176_0] Message is sent to the user with telegram message id -*****.232391.
2019-11-25 08:29:46,621 [DEBUG]: efb_telegram_master.slave_message (slave_message.dispatch_message; slave_message.py:207)
[b0805a8f-5218-4010-91ab-44c4dd4d2c94_50176_0] Pickle size: 694
2019-11-25 08:29:46,621 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2993)
('SELECT "t1"."id", "t1"."slave_channel_id", "t1"."slave_channel_emoji", "t1"."slave_chat_uid", "t1"."slave_chat_group_id", "t1"."slave_chat_name", "t1"."slave_chat_alias", "t1"."slave_chat_type", "t1"."pickle" FROM "slavechatinfo" AS "t1" WHERE ((("t1"."slave_channel_id" = ?) AND ("t1"."slave_chat_uid" = ?)) AND ("t1"."slave_chat_group_id" IS ?)) LIMIT ?', ['milkice.qq', 'private', None, 1])
2019-11-25 08:29:46,622 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2993)
('UPDATE "slavechatinfo" SET "slave_channel_id" = ?, "slave_channel_emoji" = ?, "slave_chat_uid" = ?, "slave_chat_group_id" = ?, "slave_chat_name" = ?, "slave_chat_alias" = ?, "slave_chat_type" = ?, "pickle" = ? WHERE ("slavechatinfo"."id" = ?)', ['milkice.qq', '🐧', 'private_', None, '', '', 'User', <memory at 0x7f914415aac8>, 305])
2019-11-25 08:29:46,632 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2993)
('INSERT INTO "msglog" ("master_msg_id", "master_msg_id_alt", "slave_message_id", "text", "slave_origin_uid", "slave_origin_display_name", "slave_member_uid", "slave_member_display_name", "media_type", "mime", "file_id", "msg_type", "pickle", "sent_to", "time") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', ['-.232391', None, 'b0805a8f-5218-4010-91ab-44c4dd4d2c94_50176_0', '发送图片。', 'milkice.qq private_', '', 'private_**', '', 'Document', None, 'BQADAQADhwADWmvhRoQS985jz1fBFgQ', 'Image', <memory at 0x7f914415aac8>, 'slave', datetime.datetime(2019, 11, 25, 8, 29, 46, 632570)])
rt
2019-08-25 06:15:59,555 [DEBUG]: efb_qq_slave.Clients.CoolQ.CoolQ (CoolQ.handle_msg; CoolQ.py:71)
{'anonymous': None, 'font': 1328896, 'group_id': ******, 'message': '******', 'message_id': 141, 'message_type': 'group', 'post_type': 'message', 'raw_message': '******', 'self_id': ******, 'sender': {'age': 0, 'area
': '', 'card': '******', 'level': '话唠', 'nickname': '******', 'role': 'member', 'sex': 'unknown', 'title': '', 'user_id': ******}, 'sub_type': 'normal', 'time': 1566713759, 'user_id': ******}
2019-08-25 06:15:59,558 [DEBUG]: root (CoolQ.handle_msg; CoolQ.py:78)
start
2019-08-25 06:15:59,558 [DEBUG]: root (CoolQ.handle_msg; CoolQ.py:79)
0
2019-08-25 06:15:59,558 [DEBUG]: root (CoolQ.handle_msg; CoolQ.py:80)
******
2019-08-25 06:15:59,558 [DEBUG]: root (CoolQ.handle_msg; CoolQ.py:81)
end
2019-08-25 06:15:59,559 [ERROR]: cqhttp (app.log_exception; app.py:1891)
Exception on / [POST]
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/lib/python3.7/site-packages/cqhttp/__init__.py", line 100, in _handle
response = handler(payload)
File "/usr/lib/python3.7/site-packages/cqhttp/__init__.py", line 36, in wrapper
return func(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/efb_qq_slave/Clients/CoolQ/CoolQ.py", line 82, in handle_msg
msg_type = msg_element[i]['type']
TypeError: string indices must be integers
2019-08-25 06:34:15,536 [INFO]: werkzeug (_internal._log; _internal.py:122)
127.0.0.1 - - [25/Aug/2019 06:34:15] "POST / HTTP/1.1" 500 -
EH Forwarder Bot
Version: 2.0.0b20.dev3
Python version:
3.7.4 (default, Jul 16 2019, 07:12:58)
[GCC 9.1.0]
Running on profile "default".
Master channel:
Telegram Master (blueset.telegram) 2.0.0b26.dev5 # Default instance
Slave channel:
QQ Slave (milkice.qq) 2.0.0a10 # Default instance
Middlewares:
No middleware is enabled.
名字 : python-efb-qq-slave-git
版本 : r95.ae62beb-1
描述 : EFB QQ Slave, a channel for EH Forwarder Bot.
架构 : any
URL : https://github.com/milkice233/efb-qq-slave
软件许可 : GPL3
组 : 无
提供 : python-efb-qq-slave
依赖于 : python>=3.6 python-ehforwarderbot python-telegram-bot python-requests python-magic python-pyaml python-pillow
python-cqhttp ffmpeg
可选依赖 : 无
依赖它 : 无
被可选依赖 : 无
与它冲突 : python-efb-qq-slave
取代 : 无
安装后大小 : 189.00 KiB
打包者 : Unknown Packager
编译日期 : 2019年08月25日 星期日 02时26分27秒
安装日期 : 2019年08月25日 星期日 02时34分20秒
安装原因 : 单独指定安装
安装脚本 : 否
验证者 : 无
名字 : python-efb-telegram-master-git
版本 : r192.7ab5eab-1
描述 : EFB Telegram Master, a channel for EH Forwarder Bot.
架构 : any
URL : https://github.com/blueset/efb-telegram-master
软件许可 : AGPL-3
组 : efb
提供 : python-efb-telegram-master
依赖于 : python-yaml python-ehforwarderbot python-telegram-bot python-magic-ahupp python-moviepy python-imageio-ffmpeg p
ython-peewee python-requests python-pydub python-retrying python-language-tags
可选依赖 : 无
依赖它 : 无
被可选依赖 : 无
与它冲突 : python-efb-telegram-master
取代 : 无
安装后大小 : 841.00 KiB
打包者 : Unknown Packager
编译日期 : 2019年08月25日 星期日 02时22分51秒
安装日期 : 2019年08月25日 星期日 02时34分39秒
安装原因 : 单独指定安装
安装脚本 : 否
验证者 : 无
名字 : python-ehforwarderbot-git
版本 : r429.400de55-1
描述 : An extensible message tunneling chat bot framework. Delivers messages to and from multiple platforms and remotely con
trol your accounts.
架构 : any
URL : https://github.com/blueset/ehForwarderBot
软件许可 : AGPL-3
组 : efb
提供 : python-ehforwarderbot
依赖于 : python-ruamel-yaml python-bullet python-cjkwrap python-typing-extensions
可选依赖 : 无
依赖它 : python-efb-qq-slave-git python-efb-telegram-master-git
被可选依赖 : 无
与它冲突 : python-ehforwarderbot
取代 : 无
安装后大小 : 407.00 KiB
打包者 : Unknown Packager
编译日期 : 2019年08月25日 星期日 01时53分25秒
安装日期 : 2019年08月25日 星期日 02时34分20秒
安装原因 : 单独指定安装
安装脚本 : 是
验证者 : 无
名字 : coolq-pro-bin
版本 : 5.14.10-1
描述 : 一款智能机器人软件,由应用提供群管理、智能对话、好友互动、生活助理等智能功能。
架构 : any
URL : https://cqp.cc/t/14901
软件许可 : custom
组 : 无
提供 : coolq
依赖于 : wine
可选依赖 : 无
依赖它 : coolq-cqhttp-api-bin coolq-vnc
被可选依赖 : 无
与它冲突 : 无
取代 : 无
安装后大小 : 2.33 MiB
打包者 : Unknown Packager
编译日期 : 2019年08月25日 星期日 04时31分16秒
安装日期 : 2019年08月25日 星期日 04时31分28秒
安装原因 : 单独指定安装
安装脚本 : 否
验证者 : 无
名字 : coolq-cqhttp-api-bin
版本 : 4.10.1-1
描述 : CoolQ 插件实现通过 HTTP 上报事件信息及调用接口
架构 : any
URL : https://github.com/richardchien/coolq-http-api
软件许可 : GPL3
组 : 无
提供 : coolq-cqhttp-api
依赖于 : coolq
可选依赖 : 无
依赖它 : 无
被可选依赖 : 无
与它冲突 : 无
取代 : 无
安装后大小 : 1180.00 KiB
打包者 : Unknown Packager
编译日期 : 2019年08月25日 星期日 03时58分42秒
安装日期 : 2019年08月25日 星期日 04时11分30秒
安装原因 : 单独指定安装
安装脚本 : 否
验证者 : 无
Client: CoolQ # 指定要使用的 QQ 客户端(此处为CoolQ)
CoolQ:
type: HTTP # 指定 efb-qq-slave 与 酷Q 通信的方式 现阶段仅支持HTTP
access_token: *****
api_root: http://127.0.0.1:5700/ # 酷Q API接口地址/端口
host: 127.0.0.1 # efb-qq-slave 所监听的地址用于接收消息
port: 8000 # 同上
is_pro: True # 若为酷Q Pro则为true,反之为false
air_option: # 包含于 air_option 的配置选项仅当 is_pro 为 false 时才有效
upload_to_smms: True # 将来自 EFB主端(通常是Telegram) 的图片上传到 sm.ms 服务器并以链接的形式发送到 QQ 端
{
"general": {
"host": "127.0.0.1",
"post_url": "http://127.0.0.1:8000",
"access_token": "*****"
}
}
(迫于开学 可能下星期六晚才能回复 抱歉
自己留着备忘,当然同时欢迎 contribution
More info: https://docs.cqp.cc/about/FAQ/
Consider migrate to mirai (Just got archived, status unknown)?
ehforwarderbot.main (main.init; main.py:85)
Initializing slave milkice.qq...
Traceback (most recent call last):
File "/usr/local/bin/ehforwarderbot", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/ehforwarderbot/main.py", line 269, in main
init(conf)
File "/usr/local/lib/python3.6/dist-packages/ehforwarderbot/main.py", line 91, in init
coordinator.add_channel(cls(instance_id=instance_id))
File "/usr/local/lib/python3.6/dist-packages/efb_qq_slave/init.py", line 43, in init
self.load_config()
File "/usr/local/lib/python3.6/dist-packages/efb_qq_slave/init.py", line 69, in load_config
self.config: Dict[str, Any] = yaml.load(f)
File "/usr/lib/python3/dist-packages/yaml/init.py", line 72, in load
return loader.get_single_data()
File "/usr/lib/python3/dist-packages/yaml/constructor.py", line 35, in get_single_data
node = self.get_single_node()
File "/usr/lib/python3/dist-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/usr/lib/python3/dist-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
File "/usr/lib/python3/dist-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/lib/python3/dist-packages/yaml/composer.py", line 127, in compose_mapping_node
while not self.check_event(MappingEndEvent):
File "/usr/lib/python3/dist-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/lib/python3/dist-packages/yaml/parser.py", line 439, in parse_block_mapping_key
"expected , but found %r" % token.id, token.start_mark)
yaml.parser.ParserError: while parsing a block mapping
in "/root/.ehforwarderbot/profiles/default/milkice.qq/config.yaml", line 1, column 1
expected , but found ''
in "/root/.ehforwarderbot/profiles/default/milkice.qq/config.yaml", line 2, column 5
log
[2019-04-08 15:28:39.322] [I] [HTTP] 开启 HTTP 服务器成功,开始监听 http://[::]:5700
[2019-04-08 15:28:39.326] [W] [HTTP] 通过 HTTP 上报数据到 http://xxx:5700 失败,状态码:404
在不知道什么情况下,群列表里的群组会出现重复现象
When launching efb:
It says:
yaml.scanner.ScannerError: mapping values are not allowed here
in "/root/.ehforwarderbot/profiles/default/milkice.qq/config.yaml", line 4, column 29
I copied your config but it doesn't work, I got wechat working but not this one.
由于好友过多,每次需要翻好久才能翻到群聊,有没有办法把群聊放在好友前面或者输入/link后先分组显示呢
qq课堂,qq游戏之类私聊*扰有点烦人
腾讯课堂: (unsupported)
[Here comes the Rich Text, dumping...]
text:UG设计大咖成长秘籍!《年后涨薪必修课》 2月27日
url:http://q.url.cn/url/Jump?url=https%3A%2F%2Fm.ke.qq.com%2FcourseDetail.html%3Fcourse_id%3D100422834%26_bid%3D167%26_wv%3D1%26from%3D800001669%26callApp%3D1%26mp_sourceid%3D0.0.0&_wv=1&rdm=52f54c
又屏蔽不了,暂时没找到合理的解决方案.
我无法知道个人是否有发文件给我,不知道是不是自己的配置错误
在noVNC登录酷Q之后shell提示
HTTP 上报地址 http://127.0.0.1:8000 无法访问
显示(xxxx是tgid)
<a href="tg://user?id=xxxxxxxx"><a hre</a>
内容均无法显示,但tg聊天界面右下角会提示被at了
群里的回复也是相似的错乱
向目标qq发送一条消息,coolq的图灵机器人也能正常反应,就是efb没反应,tg上收不到消息
但是用tg发送消息是可以的
TG发到QQ上的消息可以正常被转发给QQ,但是QQ上的消息不会发给TG,按照 #33 的方式测试了也不行
在群组中发出 link 指令(start@xxx_bot ) 之后,报错
错误: 未指定消息接收者。
请回复一条过去的消息。(MS02)
尝试多次未果,不知道是哪里的问题。
启动服务后向Telegram机器人发送任何指令均无作用,且转发服务无法运行。VNC成功运行且已登陆QQ账号,酷Q机器人正常运行并可执行互动式向导,在ehforwarderbot日志中发现AttributeError。
sslocal -c /etc/shadowsocks/config.json &
docker run -ti --rm --name cqhttp-test --net="host" \
-v $(pwd)/coolq:/home/user/coolq \
-p 9000:9000 \
-p 5700:5700 \
-e VNC_PASSWD=blahblah \
-e COOLQ_PORT=5700 \
-e COOLQ_ACCOUNT=123456789 \
-e CQHTTP_POST_URL=http://127.0.0.1:8000 \
-e CQHTTP_SERVE_DATA_FILES=yes \
-e CQHTTP_ACCESS_TOKEN=ac0f790e1fb74ebcaf45da77a6f9de47 \
-e CQHTTP_POST_MESSAGE_FORMAT=array \
richardchien/cqhttp:latest
proxychains ehforwarderbot
WARNING: Published ports are discarded when using host network mode
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 010-app: applying...
[fix-attrs.d] 010-app: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 010-setup-vnc: executing...
Would you like to enter a view-only password (y/n)? Password:Verify:[cont-init.d] 010-setup-vnc: exited 0.
[cont-init.d] 020-setup-sudo: executing...
[cont-init.d] 020-setup-sudo: exited 0.
[cont-init.d] 110-get-coolq: executing...
CoolQ already exists, skip download.
DEBUG: 插件版本已锁定,开始覆盖 cpk 文件……
INFO: CoolQ HTTP API 插件 bootstrap 完成。
[cont-init.d] 110-get-coolq: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
xauth: file /home/user/.Xauthority does not exist
WebSocket server settings:
- Listen on :9001
- No SSL/TLS support (no cert file)
- proxying from :9001 to 127.0.0.1:5911
New 'iZuf6i3xfl9zacvzwqpz8vZ:11 (user)' desktop is iZuf6i3xfl9zacvzwqpz8vZ:11
Creating default startup script /home/user/.vnc/xstartup
Creating default config /home/user/.vnc/config
Starting applications specified in /home/user/.vnc/xstartup
Log file is /home/user/.vnc/iZuf6i3xfl9zacvzwqpz8vZ:11.log
[CQDaemon] Starting CoolQ ....
[CQDaemon] Started CoolQ .
[2019-09-14 04:00:06.109] [I] [日志] 日志控制台开启成功
[2019-09-14 04:00:06.115] [I] [HTTP] 开启 HTTP 服务器成功,开始监听 http://[::]:5700
[2019-09-14 04:00:06.136] [I] [HTTP] 通过 HTTP 上报数据到 http://127.0.0.1:8000 成功,状态码:200
ProxyChains-3.1 (http://proxychains.sf.net)
2019-09-14 10:59:08,037 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:85)
Initializing slave milkice.qq...
2019-09-14 10:59:08,045 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:96)
Slave channel QQ Slave (milkice.qq) # Default profile is initialized.
2019-09-14 10:59:08,045 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:99)
Initializing master blueset.telegram...
|DNS-request| api.telegram.org
|S-chain|-<>-127.0.0.1:1080-<><>-4.2.2.2:53-<><>-OK
|DNS-response| api.telegram.org is 149.154.167.220
|S-chain|-<>-127.0.0.1:1080-<><>-149.154.167.220:443-<><>-OK
2019-09-14 10:59:10,373 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:109)
Master channel Telegram Master (blueset.telegram) # Default profile is initialized.
2019-09-14 10:59:10,373 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:111)
All channels initialized.
2019-09-14 10:59:10,373 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:125)
All middlewares are initialized.
|S-chain|-<>-127.0.0.1:1080- * Serving Flask app "cqhttp" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
<><>-127.0.0.1:5700-<><>-OK
|DNS-request| api.telegram.org
|S-chain|-<>-127.0.0.1:1080-<><>-4.2.2.2:53-<><>-OK
|DNS-response| api.telegram.org is 149.154.167.220
|S-chain|-<>-127.0.0.1:1080-<><>-149.154.167.220:443-<><>-OK
2019-09-14 11:00:55,508 [ERROR]: telegram.ext.dispatcher (dispatcher.process_update; dispatcher.py:301)
An uncaught error was raised while processing the update
Traceback (most recent call last):
File "/home/nutr1t07/.local/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 279, in process_update
handler.handle_update(update, self)
File "/home/nutr1t07/.local/lib/python3.6/site-packages/telegram/ext/commandhandler.py", line 173, in handle_update
return self.callback(dispatcher.bot, update, **optional_args)
File "/home/nutr1t07/.local/lib/python3.6/site-packages/efb_telegram_master/chat_binding.py", line 678, in start_chat_list
return self.chat_head_req_generate(bot, target, pattern=" ".join(args), chats=chats)
File "/home/nutr1t07/.local/lib/python3.6/site-packages/efb_telegram_master/chat_binding.py", line 727, in chat_head_req_generate
source_chats=chats)
File "/home/nutr1t07/.local/lib/python3.6/site-packages/efb_telegram_master/chat_binding.py", line 330, in slave_chats_pagination
slave_chats = slave.get_chats()
File "/home/nutr1t07/.local/lib/python3.6/site-packages/efb_qq_slave/__init__.py", line 94, in get_chats
return self.QQClient.get_chats()
AttributeError: 'function' object has no attribute 'get_chats'
并依照 https://milkice.me/2018/09/17/efb-how-to-send-and-receive-messages-from-qq-on-telegram/ 步骤安装。
报错信息如下:
Traceback (most recent call last):
File "/usr/local/bin/ehforwarderbot", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/ehforwarderbot/__main__.py", line 263, in main
conf = config.load_config()
File "/usr/local/lib/python3.6/dist-packages/ehforwarderbot/config.py", line 60, in load_config
channel = utils.locate_module(i, 'slave')
File "/usr/local/lib/python3.6/dist-packages/ehforwarderbot/utils.py", line 145, in locate_module
return i.load()
File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 2449, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python3.6/dist-packages/efb_qq_slave/__init__.py", line 11, in <module>
from ehforwarderbot import EFBChannel, ChannelType, EFBMsg, EFBStatus, EFBChat, MsgType
ImportError: cannot import name 'EFBChannel'
基本依赖已安装并满足要求,确认配置文件无误。
前几天更新了ehforwarderbot,发现结构变化太大了,efb-qq-slave直接崩了,我下载了最新的那个分支,替换了site-package里面对应的文件夹才行。估计蛮多小伙伴都会更新ehforwarderbot,所以还是建议作者合并一下分支,或者版本管理一下?谢了
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.