“person using smartphone” by Christian Wiediger on Unsplash

用 Telegram 收发微信消息

日向
日向
Dec 30, 2017 · 9 min read

服务器环境准备

1. 用 HyperApp 安装

--restart=always -v $(pwd)/config.py:/opt/ehForwarderBot/config.py -v $(pwd)/tgdata.db:/opt/ehForwarderBot/plugins/eh_telegram_master/tgdata.db

2. 普通安装方法

git clone https://github.com/blueset/ehForwarderBot.git
cd ehForwarderBot
mkdir storage
chmod +rw ./storage
sudo apt-get install python3-dev python3-setuptools
sudo apt-get install libwebp-dev
sudo apt-get install libmagic-dev ffmpeg
pip3 install -r requirements.txt

Telegram 准备

help - 显示指令列表
link - 将会话绑定到 Telegram 群组
info - 显示当前 Telegram 会话信息
chat - 生成会话头
recog - 回复语音消息以进行识别
extra - 获取更多功能

配置 ehForwarderBot

cp config.sample.py config.py
editor config.py

实验性功能

eh_telegram_master = {
# ...
"flags": {
"network_error_prompt_interval": 0
}
}
eh_wechat_slave = {
# ...
"flags": {
"uid_order": ["alias","NickName"]
}
}
eh_telegram_master = {
# ...
"flags": {
"text_as_html": True
}
}

启动

python3 daemon.py start
sudo apt-get install screen
screen -S efb
python3 main.py

使用

参考资料

Every Little Thing

生活琐事、游记、影评、吐槽与笔记

日向

Written by

日向

Nothing lasts forever.

Every Little Thing

生活琐事、游记、影评、吐槽与笔记