-
Notifications
You must be signed in to change notification settings - Fork 915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message.chat_id
can be a string
or int
#527
Comments
Message.chat_id
can be a string
or int
My go skills are not enough but from what I understand, we would need to change this line in the From what I have read it isn't possible to have 2 types for the same field. But the type https://stackoverflow.com/questions/24480835/decoding-json-int-into-string/24480906#24480906. Edit: from the new 1.18 go release, Generics may potentially be the solution. |
in my practice (6+ years) no one uses channel name as chat_id |
I use it so my bot can post content on my channel to automatically update followers. And I think a lot of people use it |
All groups and channels can be addressed by their ID, you don't need to use the username. The library is structured in such a way that every request accepts a username field, but there aren't helpers for it. You can construct the |
From the telegram api
chat_it
can be anint
orstring
(int
forusername
butstring
for channel"@channelname"
.Currently using the library:
I have the error
The text was updated successfully, but these errors were encountered: