go-tdlib icon indicating copy to clipboard operation
go-tdlib copied to clipboard

GetSupergroup accepts only int32 but GetChat().ID returns int64

Open simonfrey opened this issue 5 years ago • 2 comments

I want to get information about a superuser group. I use the chat example and try to access the superuser info with GetSupergroup().

The GetSupergroup() function accepts a int32 but the chat.ID returned by GetChat() is a int64.

Expected: They both should be of the same type

simonfrey avatar Oct 18 '19 16:10 simonfrey

I have same problem, how to get groupsuper_id in a *tdlib.Chat

Lifelong-Study avatar Oct 14 '20 06:10 Lifelong-Study

the code in this library is auto-generated from tdlib's td_api.tl and as seen in tdlib's docs getSupergroup accepts int32 (link)

also the chat's id, it's type is int53 (link) which has no direct equivalent in go. so this library uses int64 instead.

I think you should ask this on tdlib/td

er-azh avatar Jul 13 '21 21:07 er-azh