16 lines
		
	
	
	
		
			393 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
	
		
			393 B
		
	
	
	
		
			Go
		
	
	
	
	
	
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) {
 | 
						|
 | 
						|
	hi := tgbotapi.ChatConfigWithUser{
 | 
						|
		ChatID: chatid,
 | 
						|
		UserID: userid,
 | 
						|
	}
 | 
						|
	member, err := bot.GetChatMember(tgbotapi.GetChatMemberConfig{ChatConfigWithUser: hi})
 | 
						|
	if err != nil {
 | 
						|
		return
 | 
						|
	}
 | 
						|
	return member
 | 
						|
}
 |