-
Notifications
You must be signed in to change notification settings - Fork 101
🛠️ fix: models.InputSticker model handling/usage #201
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
Conversation
Can you add documentation to readme.md about this method? |
Sure |
fileContent, _ := images.ReadFile("images/telegram.png") | ||
|
||
inputSticker1 := models.InputSticker{ | ||
Sticker: "https://github.com/go-telegram/bot/blob/main/examples/create_new_sticker_set/images/telegram.png?raw=true", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some restrictions for input sticker files, so I could not find any Telegram logo or Golang logo with .PNG
extension and with sizes 512x512
(one size can be less)
Such link will be available after merge
// you should handle this error properly in your code. | ||
panic(err) | ||
} | ||
botUsername = user.Username |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like bot.Bot
can store such info, do not you think so?
Maybe create an issue?
But what to do with skip-get-me
option? No get me, no info.
Done! |
Current version of
go-telegram/bot
does not support createNewStickerSet operationBecause of
models.InputSticker
struct and its handling inbuild_request_form.go
If we are trying to create new sticker with such code:
You will get next error:
Bad Request: video stickers can't be uploaded by URL
But we are uploading file, not URL, are we?
This pull request contains two things:
models.InputSticker
inbuild_request_form.go
models.InputSticker
model containssticker: String
field (notsticker: InputFile
)And now we can do this without error: