выбор времени
This commit is contained in:
@@ -103,6 +103,17 @@ func (b *Bot) Render(text string, keyboard echotron.InlineKeyboardMarkup, mode R
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Bot) DownloadFileBytes(fileID string) ([]byte, error) {
|
||||
res, err := b.GetFile(fileID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res.Result == nil || res.Result.FilePath == "" {
|
||||
return nil, fmt.Errorf("telegram file not available")
|
||||
}
|
||||
return b.DownloadFile(res.Result.FilePath)
|
||||
}
|
||||
|
||||
func (b *Bot) SendNew(text string, keyboard echotron.InlineKeyboardMarkup) {
|
||||
// Удаляем кнопки у предыдущего сообщения перед отправкой нового
|
||||
if b.LastMessageID != 0 {
|
||||
|
||||
Reference in New Issue
Block a user