fix v2
This commit is contained in:
		
							parent
							
								
									f00e8e1509
								
							
						
					
					
						commit
						d52bd7d692
					
				
					 2 changed files with 37 additions and 21 deletions
				
			
		|  | @ -2,15 +2,11 @@ package botIO | |||
| 
 | ||||
| import tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5" | ||||
| 
 | ||||
| func GetUserByID(chatid int64, userid int64, bot *tgbotapi.BotAPI) (member tgbotapi.ChatMember) { | ||||
| func GetUserByID(userToGet tgbotapi.ChatConfigWithUser, bot *tgbotapi.BotAPI) (error bool, member tgbotapi.ChatMember) { | ||||
| 
 | ||||
| 	hi := tgbotapi.ChatConfigWithUser{ | ||||
| 		ChatID: chatid, | ||||
| 		UserID: userid, | ||||
| 	} | ||||
| 	member, err := bot.GetChatMember(tgbotapi.GetChatMemberConfig{ChatConfigWithUser: hi}) | ||||
| 	member, err := bot.GetChatMember(tgbotapi.GetChatMemberConfig{ChatConfigWithUser: userToGet}) | ||||
| 	if err != nil { | ||||
| 		return | ||||
| 		return true, member | ||||
| 	} | ||||
| 	return member | ||||
| 	return false, member | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue