🔇 Remove debug logs and update version

This commit is contained in:
Alphyron 2021-04-01 22:18:37 +02:00
parent ae1487e5a9
commit a0494b72b1
2 changed files with 1 additions and 16 deletions

View File

@ -38,7 +38,6 @@ func CheckForLeavingUser(ticker *time.Ticker, quitChannel <-chan struct{}, group
if group.Size < teleSize { if group.Size < teleSize {
group.Size = teleSize group.Size = teleSize
_, err = groupHelperService.UpdateGroup(group) _, err = groupHelperService.UpdateGroup(group)
log.Println(err)
continue continue
} }
@ -61,17 +60,12 @@ func checkGroupUser(group *models.Group, groupHelperService logic.GroupHelperSer
users, err := groupHelperService.ListGroupUsers(group) users, err := groupHelperService.ListGroupUsers(group)
log.Println("users")
if err != nil { if err != nil {
log.Println("Error while getting the users for group while checking for leaved user") log.Println("Error while getting the users for group while checking for leaved user")
log.Println(err) log.Println(err)
return return
} }
log.Println("no err")
log.Println(len(users))
for _, user := range users { for _, user := range users {
<-throttle // rate limit our Service.Method RPCs <-throttle // rate limit our Service.Method RPCs
@ -79,20 +73,11 @@ func checkGroupUser(group *models.Group, groupHelperService logic.GroupHelperSer
ChatID: group.GroupID, ChatID: group.GroupID,
UserID: int(user.UserID), UserID: int(user.UserID),
} }
log.Println(user.UserID)
member, _ := bot.GetChatMember(userConfig) member, _ := bot.GetChatMember(userConfig)
log.Println(member.User.FirstName)
log.Println(member.HasLeft())
if !member.HasLeft() { if !member.HasLeft() {
continue continue
} }
log.Println("User left")
leaveMessage := group.UserLeaveMessage leaveMessage := group.UserLeaveMessage
leaveMessage = message.ReplaceMessage(leaveMessage, member.User) leaveMessage = message.ReplaceMessage(leaveMessage, member.User)

View File

@ -30,7 +30,7 @@ func (i infoCommand) ExecuteCommand(bot *tgbotapi.BotAPI, update *tgbotapi.Updat
"General Information to this Bot\n" + "General Information to this Bot\n" +
"===============================\n" + "===============================\n" +
"Developer: @Alphyron\n" + "Developer: @Alphyron\n" +
"Version: 2.2.4\n" + "Version: 2.2.5\n" +
"Git: [Gitea Repository](https://git.dragon-labs.de/alphyron/group_assistant)\n" + "Git: [Gitea Repository](https://git.dragon-labs.de/alphyron/group_assistant)\n" +
"===============================" "==============================="