github tucnak/telebot v2.3.0
Telebot V2.3

latest releases: v4.0.0-beta.4, v4.0.0-beta.3, v4.0.0-beta.2...
4 years ago

Changelog

  • Bot API 4.9

  • Special ErrTrueResult error for updating methods

  • Extended b.Edit() function:

    b.Edit(m, m.Text, newMarkup)
    b.Edit(m, "new <b>text</b>", tb.ModeHTML)
    b.Edit(m, &tb.ReplyMarkup{...})
    b.Edit(m, &tb.Photo{File: ...})
    b.Edit(m, tb.Location{42.1337, 69.4242})
  • Default parse mode:

    pref := tb.Settings{
        Token:     "",
        ParseMode: tb.ModeMarkdown,
    }
    
    b, _ := tb.NewBot(pref)
    b.Send(to, "*text*")                   // default markdown mode
    b.Send(to, "<b>text</b>", tb.ModeHTML) // forced html mode
  • Verbose mode for outcoming requests:

    pref := tb.Settings{
        Token:   "",
        Verbose: true,
    }
    
    b, _ := tb.NewBot(pref)
    b.Notify(to, tb.Typing)
    [verbose] telebot: sent request
    Method: sendChatAction
    Params: {
        "action": "typing",
        "chat_id": "..."
    }
    Response: {
        "ok": true,
        "result": true
    }
    

Fixes

  • Updating methods unmarshalling fix (#298)
  • SuccessfulPayment currency type fix (#299)
  • Stickers API minor fixes

Don't miss a new telebot release

NewReleases is sending notifications on new releases.