Skip to content

Commit

Permalink
fix delete join user already restricted
Browse files Browse the repository at this point in the history
  • Loading branch information
momai authored May 28, 2023
1 parent bb34f89 commit d2c9db1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ func challengeUser(m *tb.Message) {
if chatMember.RestrictedUntil != 0 {
// Пользователь уже забанен, пропускаем вывод капчи
log.Printf("User: %v is already restricted in chat: %v", m.UserJoined, m.Chat)
if config.PrintSuccessAndFail == "del" {
err := bot.Delete(m)
if err != nil {
log.Println(err)
}
}
return
}

Expand Down

0 comments on commit d2c9db1

Please sign in to comment.