Skip to content

Commit

Permalink
update:ad处理后直接删除验证消息
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashang committed Dec 15, 2022
1 parent 7ef125a commit 183542e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions telegram/handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ func AdBlock(c tb.Context) error {
}
return c.Send(fmt.Sprintf("管理员已解除对用户:[%s](%s) 的封禁", userNickname, userLink), tb.ModeMarkdownV2)
}, isManageMiddleware)
//删除验证消息
go func() {
userIdStr := strconv.FormatInt(userId, 10)
captchaCode := gUserCaptchaCodeTable.Get(userIdStr)
if err = Bot.Delete(captchaCode.CaptchaMessage); err != nil {
log.Sugar.Error("[AdBlock] delete captcha message err:", err)
}
}()
if err = c.Reply(blockMessage, manslaughterMenu, tb.ModeMarkdownV2); err != nil {
log.Sugar.Error("[AdBlock] reply message err:", err)
return err
Expand Down

0 comments on commit 183542e

Please sign in to comment.