Bot API 7.3 implementation

This commit is contained in:
stdkhai 2024-05-07 17:32:47 +03:00
parent 29fd5ed941
commit 1ad852c765
5 changed files with 132 additions and 6 deletions

View file

@ -933,7 +933,7 @@ func NewDeleteChatPhoto(chatID int64) DeleteChatPhotoConfig {
}
// NewPoll allows you to create a new poll.
func NewPoll(chatID int64, question string, options ...string) SendPollConfig {
func NewPoll(chatID int64, question string, options ...InputPollOption) SendPollConfig {
return SendPollConfig{
BaseChat: BaseChat{
ChatConfig: ChatConfig{ChatID: chatID},
@ -944,6 +944,13 @@ func NewPoll(chatID int64, question string, options ...string) SendPollConfig {
}
}
// NewPollOption allows you to create poll option
func NewPollOption(text string) InputPollOption {
return InputPollOption{
Text: text,
}
}
// NewStopPoll allows you to stop a poll.
func NewStopPoll(chatID int64, messageID int) StopPollConfig {
return StopPollConfig{