github tucnak/telebot v2.3.0
Telebot V2.3

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
latest releases: v2.3.5, v2.3.4, v2.3.3...
12 months ago