Skip to content

v2.0.0-rc.23

Pre-release
Pre-release
Compare
Choose a tag to compare
@PaulSonOfLars PaulSonOfLars released this 11 Nov 10:55
· 30 commits to v2 since this release
35d1a9b

What's Changed

Breaking changes

NewUpdater() now takes a dispatcher as an argument. Most users should be able to migrate using this instead:

	// Create updater and dispatcher.
	dispatcher := ext.NewDispatcher(&ext.DispatcherOpts{
		// If an error is returned by a handler, log it and continue going.
		Error: func(b *gotgbot.Bot, ctx *ext.Context, err error) ext.DispatcherAction {
			log.Println("an error occurred while handling update:", err.Error())
			return ext.DispatcherActionNoop
		},
		MaxRoutines: ext.DefaultMaxRoutines,
	})
	updater := ext.NewUpdater(dispatcher, nil)

Full Changelog: v2.0.0-rc.22...v2.0.0-rc.23