Releases: protoncr/tourmaline
0.29.0
0.29.0
The core functionality of Tourmaline is now auto generated from the official Bot API documentation. This means that Tourmaline will always be up to date with the latest version of the Bot API.
Added:
- New method set_my_name to change the bot's name. Returns True on success.
- New method get_my_name to get the current bot name for the user's language. Returns BotName on success.
- New Tourmaline::BotName class to represent the bot's name.
- New Tourmaline::InlineQueryResultsButton class to represent a button shown above inline query results.
- New Tourmaline::SwitchInlineQueryChosenChat class to represent an inline button for switching the user to inline mode in a chosen chat.
Changed:
- Updated Tourmaline::WriteAccessAllowed class to include an optional web_app_name property for the Web App launched from a link.
- Modified Tourmaline::InlineKeyboardButton class to include an optional switch_inline_query_chosen_chat property.
- Updated Tourmaline::CallbackQuery class to include an optional via_chat_folder_invite_link property.
- Modified answerInlineQuery method to accept a Tourmaline::InlineQueryResultsButton instead of switch_pm_text and switch_pm_parameter parameters.
Fixed:
No bug fixes reported in this diff.
v0.29.0-beta.1
What's Changed
- Types and methods are now auto generated
- Lots of changes and fixes due to the above
- Bump wheel from 0.37.0 to 0.38.1 by @dependabot in #59
New Contributors
- @dependabot made their first contribution in #59
Full Changelog: v0.28.0...v0.29.0-beta.1
v0.28.0
What's Changed
- Complete refactor. See https://github.com/protoncr/tourmaline/blob/master/CHANGELOG.md
- models/location: horizontal_accuracy is a Float64 by @nilsding in #58
- Specify using UTF-16 Little endian by @etra0 in #61
New Contributors
Full Changelog: v0.27.0...v0.28.0
Bot API 6.3 and more!
- Added full support for Bot API 6.3
- (breaking change) All
is_
prefixed properties in models have been replaced with?
getters. For instance,is_anonymous
is nowanonymous?
. - (breaking change)
Client#default_parse_mode
andClient#default_command_prefixes
have been made class properties instead of instance properties. - Fixed issues with missing
priority
andgroup
properties on event handlers. - (breaking change)
extra/paginated_keyboard
no longer extendsInlineKeyboardMarkup
. - Added methods
Client#send_paginated_keyboard
,Chat#send_paginated_keyboard
,Message#reply_with_paginated_keyboard
, andMessage#respond_with_paginated_keyboard
. Requires import ofextra/paginated_keyboard
. - Fixed broken parts of
extra/routed_menu
. - Fixed broken parts of
extra/stage
. - Handlers no longer require an instance of
Tourmaline::Client
. - Added several new
UpdateAction
s includingThreadMessage
,ForumTopicCreated
,ForumTopicClosed
,ForumTopicReopened
,VideoChatScheduled
,VideoChatStarted
,VideoChatEnded
,VideoChatParticipantsInvited
, andWebAppData
. - Bot examples have all been fixed
- More, see the official Bot API changelog for a complete list of changes.
Added sender_type to Message
v0.25.1 Added sender_type method
Remove global Container
v0.25.0 Remove global Container
Updated to Bot API 5.5
v0.24.0 Updated to Bot API 5.5
Updates for Bot API 5.1-5.3
v0.23.0 v0.23.0 update
Added support for TDLight
Among other things this release adds official support for TDlight, a Bot API fork with more features and more transparent development. See the CHANGELOG for more details.
Removed filters!
Ok so this release removes the filters added several releases back. I didn't like how filters forced people to think and they weren't very Crystally in function. The main issue with them was trying to allow a developer to receive information about the update being filtered. I tried to solve this using Update#context
, but it was majorly limited and pretty messy.
So handlers are back and better than ever! I had initially gotten rid of handlers because I couldn't figure out a way to handle them that wasn't messy. In the initial revision each handler was its own class, but the annotation logic for the handler was contained in the base EventHandler
class. This made it hard to figure out an easy way for people to add their own handlers without also being able to modify the method within EventHandlers::Annotator
that handled the annotation logic.
Well no more! EventHandler
is now a very simple abstract class that requires one method, call(update : Update)
. If a subclass includes a self.annotate
method that method will be called when the client is initialized. There are also several new handlers that didn't exist before, based on the filters they replaced, including CommandHandler
, HearsHandler
, CallbackQueryHandler
, ChosenInlineResultHandler
, InlineQueryHandler
, and the standard UpdateHandler
. I highly recommend checking out the API docs on each of them.
This update also brings RoutedMenu
for easy creation of menus using inline keyboards.