Skip to content

Commit

Permalink
feat: fix bug and add reame
Browse files Browse the repository at this point in the history
  • Loading branch information
uerax committed Jan 14, 2024
1 parent 3aa7c00 commit c2918ff
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions anonymous-bot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1 telegram, 2 qq
mode: 1
telegram:
token:
chatId:
token:
chatId:
4 changes: 2 additions & 2 deletions core/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (t *Telegram) Start() {
}
go t.SendMsg(t.chatId, msg)
// 设置回复Id
case "reply":
case "to":
replyId := update.Message.Text[6:]
id, err := strconv.ParseInt(strings.TrimSpace(replyId), 0, 64)
if err != nil {
Expand Down Expand Up @@ -129,7 +129,7 @@ func (t *Telegram) Start() {
IsSend: false,
})
}
mc := tgbot.NewCopyMessage(t.chatId, update.Message.From.ID, update.Message.MessageID)
mc := tgbot.NewCopyMessage(t.replyId, update.Message.From.ID, update.Message.MessageID)

go t.bot.Send(mc)
}
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1 h1:wG8n/XJQ07TmjbITcGiUaOtXxdrINDz1b0J1w0SzqDc=
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1/go.mod h1:A2S0CWkNylc2phvKXWBBdD3K0iGnDBGbzRpISP2zBl8=
github.com/uerax/goconf v1.1.1 h1:Cl6JBDP9LLdleL4F25wKPUkycQHoHg62lRtYsMcegyA=
github.com/uerax/goconf v1.1.1/go.mod h1:EKgx+7dfxxYsLIgyhWdj2sxm3Yn2OtadywZOkk6TwOI=
github.com/uerax/goconf v1.1.2 h1:PnC5MePF7CJuQ6TffyoHgjAMm0/SPgumCGXyPhULwm0=
github.com/uerax/goconf v1.1.2/go.mod h1:EKgx+7dfxxYsLIgyhWdj2sxm3Yn2OtadywZOkk6TwOI=
github.com/uerax/goconf v1.1.3 h1:ji16jwxFbBdF6T196SPKpRL/mvfOfc0U8y7nFRh6nCw=
github.com/uerax/goconf v1.1.3/go.mod h1:EKgx+7dfxxYsLIgyhWdj2sxm3Yn2OtadywZOkk6TwOI=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
Expand Down
15 changes: 15 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Anonymous Bot

__Telegram 机器人转发匿名聊天__

## Usage

```
./anonymous-bot -c anonymous-bot.yml
```

## Command

`/list`: __列出所有聊天信息__

`/to`: __选择回复用户的 chatid__

0 comments on commit c2918ff

Please sign in to comment.