https://github.com/ysicing/go-tgbot
simple bot
https://github.com/ysicing/go-tgbot
bot telegram telegram-bot
Last synced: 9 months ago
JSON representation
simple bot
- Host: GitHub
- URL: https://github.com/ysicing/go-tgbot
- Owner: ysicing
- License: apache-2.0
- Created: 2020-10-07T08:27:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-01T07:43:39.000Z (almost 5 years ago)
- Last Synced: 2025-03-06T03:51:17.826Z (over 1 year ago)
- Topics: bot, telegram, telegram-bot
- Language: Go
- Homepage:
- Size: 85.9 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# simple bot
> 一个 Telegram 推送的小工具,用于调用 Bot API 发送告警等
## 使用
### 配置文件
```yaml
tgbot: xxx # bot token
mode:
debug: false
botapi: "https://api.telegram.org/bot%s/%s"
tgchan: "@chanid" # 频道name
tguser: userid # 用户id
```
### 具体使用
```
一个 Telegram 推送的小工具,用于调用 Bot API 发送告警等
Usage:
sb [flags]
Flags:
--c string msg信息或者文件路径 (default "simple bot")
--chan msg发送chan
-h, --help help for sb
--type string msg或者file,默认msg (default "msg")
# 发送msg
sb --c "sb" # 发送到个人
sb --chan --c "sb" # 发送到频道
# 发送file
sb --c ./sb.go --type file
```