Skip to content

Commit 26d86f4

Browse files
committed
fix crashes due to restricted perms
1 parent 85c1fa7 commit 26d86f4

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

INSTALL-1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ version: '2'
2222

2323
services:
2424
tg-captcha-bot:
25-
image: mxssl/tg-captcha-bot:v1.1.3
25+
image: mxssl/tg-captcha-bot:v1.1.4
2626
volumes:
2727
- ./config.toml:/config.toml
2828
restart: unless-stopped

INSTALL-3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ cd tg-captcha-bot
1616
2. Download bot binary and move it to needed directory
1717

1818
```bash
19-
wget https://github.com/mxssl/tg-captcha-bot/releases/download/v1.1.3/tg-captcha-bot_1.1.3_linux_amd64.tar.gz
19+
wget https://github.com/mxssl/tg-captcha-bot/releases/download/v1.1.4/tg-captcha-bot_1.1.4_linux_amd64.tar.gz
2020

21-
tar xvzf tg-captcha-bot_1.1.3_linux_amd64.tar.gz
21+
tar xvzf tg-captcha-bot_1.1.4_linux_amd64.tar.gz
2222

2323
mv tg-captcha-bot /usr/local/bin/tg-captcha-bot
2424

main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,12 @@ func challengeUser(m *tb.Message) {
117117
Unique: "challenge_btn",
118118
Text: config.ButtonText,
119119
}}}
120-
challengeMsg, _ := bot.Reply(m, config.WelcomeMessage, &tb.ReplyMarkup{InlineKeyboard: inlineKeys})
120+
121+
challengeMsg, err := bot.Reply(m, config.WelcomeMessage, &tb.ReplyMarkup{InlineKeyboard: inlineKeys})
122+
if err != nil {
123+
log.Printf("Can't send challenge msg: %v", err)
124+
return
125+
}
121126

122127
n, err := strconv.ParseInt(config.WelcomeTimeout, 10, 64)
123128
if err != nil {

0 commit comments

Comments
 (0)