Skip to content

Commit

Permalink
用户解封
Browse files Browse the repository at this point in the history
  • Loading branch information
IJNKAWAKAZE committed Jul 15, 2024
1 parent 3baa30e commit 5605c8c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/plugins/gatekeeper/verify_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ func VerifyMember(message *tgbotapi.Message) {

func unban(chatId, userId int64) {
time.Sleep(time.Minute)
if bot.Arknights.GetChatMemberStatus(chatId, userId) != tgbotapi.KICKED {
bot.Arknights.UnbanChatMember(chatId, userId)
}
bot.Arknights.UnbanChatMember(chatId, userId)
}

func verify(chatId int64, userId int64, messageId int, joinMessageId int) {
Expand All @@ -104,7 +102,5 @@ func verify(chatId int64, userId int64, messageId int, joinMessageId int) {
bot.Arknights.Send(delMsg)
time.Sleep(time.Minute)
// 解除用户封禁
if bot.Arknights.GetChatMemberStatus(chatId, userId) != tgbotapi.KICKED {
bot.Arknights.UnbanChatMember(chatId, userId)
}
bot.Arknights.UnbanChatMember(chatId, userId)
}

0 comments on commit 5605c8c

Please sign in to comment.