Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vertx-china/tree-new-bee-bot
转发 TreeNewBee 消息的 Bot
https://github.com/vertx-china/tree-new-bee-bot
Last synced: about 2 months ago
JSON representation
转发 TreeNewBee 消息的 Bot
- Host: GitHub
- URL: https://github.com/vertx-china/tree-new-bee-bot
- Owner: vertx-china
- License: mit
- Created: 2022-03-05T15:10:21.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-12T06:08:05.000Z (about 2 years ago)
- Last Synced: 2023-03-10T04:56:09.402Z (almost 2 years ago)
- Language: Java
- Homepage:
- Size: 72.3 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 转发 TreeNewBee 消息的Telegram(或其他app) Bot
## Feature
- 转发 TreeNewBee 消息到 Telegram 群
- 转发 Telegram 群消息到 TreeNewBee## TODO
- 图片、表情等的转发## 使用:
### Telegram Bot 准备
1. 在 Telegram 私聊 [BotFather](https://t.me/botfather) ,创建Bot,记下 token
2. 将Bot拉入群,设为管理员(管理权限可以都去掉,只是为了能读取到所以消息)
3. 群内发消息
4. 访问 `https://api.telegram.org/bot{你的token}/getUpdates` 可以在响应里面看到刚发的消息,里面有chat的id,即群ID,记下备用。### 启动Bot
1. `mvn clean package`
2. 编辑一个 `config.json` 配置文件:
```json
{
"telegram.chatId": 555555555555, /*请替换为 Telegram 群ID*/
"telegram.botToken": "44444444444:xxxxxxxxxxxxxxx 请替换为bot的token",
"treeNewBee.server": "请替换为 TreeNewBee 服务地址",
"treeNewBee.port": 32167, /*请替换为 TreeNewBee 端口*/
"treeNewBee.nickname": "昵称,非必填,默认 '3群转发Bot' "
}
```
3. 启动 `java -jar target/tree-new-bee-bot-***.jar -conf config.json`