tucnak / telebot

Telebot is a Telegram bot framework in Go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get username by user id

hlee4real opened this issue · comments

I want to get username by user id

Here are what I'm trying to use:

b.Handle("/check", func(c tele.Context) error {
		fmt.Println(c.Sender().ID)
		u := &tele.User{ID: 123}
		fmt.Println(u.Username)
		return nil
	})
	```