televerse 1.9.10 televerse: ^1.9.10 copied to clipboard
Televerse lets you create your own efficient Telegram bots with ease in Dart. Supports latest Telegram Bot API - 6.7!
1.9.10 #
- Fix #104
- When
onMessage
listener is attached it stopped all other listeners from working. This is now fixed. - Updated README (some typos).
1.9.9 #
- Fix #102
- Commands that tagged with
@botname
will now be matched. - Minor changes on README & Session example.
1.9.8 #
- Televerse now can support handling updates passed to it as JSON data (without using a fetcher).
- This can be useful when you want to run bot on a serverless environment like AWS Lambda or Google Cloud Functions.
- Thanks to @rohitsangwan01 for the contribution. #99
onError
can now catch errors on the Long Polling.- Replaced all
Exception
withTelegramException
in the library. - Replaced the
Televerse.on
logic to an extension onTeleverse
class.
1.9.7 #
- Fix around
onError
method.
1.9.6 #
- Added
Televerse.onStop
to listen when the bot is stopped. (Fix #95) - Added
delayDuration
parameter toLongPolling
class to set the delay duration between each long polling request. - Moved all methods in
SessionFileExtension
andSessionsSaver
toSession
andSessionsManager
classes respectively. - This is to simplify the API and to make it easier to use.
- Updated
http
dependency to^1.0.0
.
1.9.4 #
- Added
SessionFileExtension
class to represent a file extension. - Added
SessionsSaver
extension onSessionsManager
class to save all sessions to a directory. - Updated /example/session_bot.dart file to reflect the changes.
- Minor breaking change: the initializer function now should accept a
int
as parameter.
1.9.3 #
- Fixed an issue with sessions that caused crash when not initialized.
1.9.2 #
- Introducing the
Televerse Session
! 🎉 - Televerse sessions are used to store data for chats.
- This can be used to store data for chats and to make the bot more interactive.
- Added an example to demonstrate the usage of Televerse sessions in
/example/session_bot.dart
. - You should use the
Televerse.initSession
method to initialize the session.
1.9.1 #
- Added the
Televerse.on
method! 🎉 - Removed the deprecation warning from the
Televerse.on
method.
1.9.0 #
- BREAKING CHANGES! ⚠️
- Whole new
HandlerScope
class is added to make it efficient handle updates. - All the methods in the
Televerse
class now uses theHandlerScope
class to register handlers. - This is to fix the issue #84 and to make it efficient to handle updates.
- Completely removed the
Event
class and related methods and getters. - The
on
method is now Deprecated. Use the other methods in the library to listen for updates. - All the getters in the
Event
class is now added to theTeleverse
class as methods. - Televerse now relies only on the
onUpdate
stream to listen for updates. - And all the errors can now be handled using the
onError
method.
1.8.6 #
- Added
UserLink
class to represent a Telegram user link. - Added
LinkText
class. This can be used to send a link with a custom text on chats. - Fixed an issue with the
Televerse.command
that caused to match unexpected commands.- This was because the
Televerse.command
method usedString.startsWith
to match the command. - Thanks to GiuseppeFn for raising the Issue #85
- This was because the
- The
HttpException
class is now renamed toTelegramException
. - This is to include the
ResponseParameters
object in the exception hence to make it easier to handle and retry if needed. - When an exception happens in the long polling, if the error handler is set using
Televerse.onError
method this will now pauses the long polling till theonError
handler completes its execution.
1.8.5 #
- Added the
Deeplink
class to represent a Telegram deeplink. - Made it easy to use Telegram deeplinks by adding
BotLink
,GroupBotLink
,ChannelBotLink
,GameLink
,SettingsLinks
andShareLink
classes. - Also added
PhoneNumberLink
,MTProxyLink
,Socks5Link
andUsernameLink
.
1.8.4 #
- ✨ Simplified mentions.
- Added the new
UserMention
class to represent a user mention. - Added an extension to
User
class to convert it to aUserMention
object. - Added
MessageContext.from
alias toMessage.from
property. - Added
CustomEmoji
class to represent a Telegram custom emoji.
1.8.3 #
- Added more helper methods on
Televerse
class to listen to updates. - Added
Televerse.onURL
method to listen to messages that contain URLs. - Added
Televerse.onHashtag
method to listen to messages that contain hashtags. - Added
Televerse.onMention
method to listen to messages that contain mentions. - Added
Televerse.onEmail
method to listen to messages that contain email addresses. - Added
Televerse.onPhoneNumber
method to listen to messages that contain phone numbers. - Improved the overall code quality.
- Added
Televerse.whenMentioned
method to listen to messages that contain mentions of the bot.
1.8.2 #
- Added
PollContext
,PollAnswerContext
classes to represent the context of apoll
andpoll_answer
updates. - Added
Televerse.poll
method to listen topoll
updates. - Added
Televerse.pollAnswer
method to listen topoll_answer
updates. - Now most of the Televerse methods return a
StreamSubscription
instead ofvoid
. - This is to make it easier to cancel the subscription and increase the performance.
- Added
ChosenInlineResultContext
class to represent the context of achosen_inline_result
update andTeleverse.chosenInlineResult
method to listen tochosen_inline_result
updates. - Added
ChatJoinRequestContext
class to represent the context of achat_join_request
update andTeleverse.chatJoinRequest
method to listen tochat_join_request
updates. - Added
ShippingQueryContext
class to represent the context of ashipping_query
update andTeleverse.shippingQuery
method to listen toshipping_query
updates. - Added
PreCheckoutQueryContext
class to represent the context of apre_checkout_query
update andTeleverse.preCheckoutQuery
method to listen topre_checkout_query
updates.
1.8.1 #
- Added
ChatMemberUpdatedContext
class to represent the context of achat_member
andmy_chat_member
updates. - Added
Televerse.chatMember
andTeleverse.myChatMember
methods to listen tochat_member
andmy_chat_member
updates. - Hot fix: Fixed an issue with the
Event
class that caused unexpected exceptions.
1.8.0 #
- 🎖️ Televerse now supports listening to Local Bot API Server.
- Added
Televerse.local
method to create a bot instance that listens to a local Bot API Server. - Added
RawAPI.local
method that can be used to createRawAPI
instance that targets a local Bot API Server. - Added
LongPolling.allUpdates
method to listen to all updates. This is to simplify listening to all updates including thechat_member
updates. - Updated
/example/test_bot.dart
file to reflect the changes.
1.7.2 #
- [BREAKING] ⚠️ - The
chat
getter on theChatID
class is now replaced to be a method of theID
class, and renamed toget()
. - This is to avoid confusion with the
chat
parameter in theChatID
class. - Also, now the
get()
method is available on all theID
classes -ChatID
,SuperGroupID
andChannelID
. - Fixed an issue that caused the Long Polling to fail.
- The issue was with the
Message.fromJson
method which was not able to parse theMessage
object when anewChatPhoto
was present. - Thanks to @deargosep for reporting and fixing this issue.
1.7.1 #
- [BREAKING] ⚠️ - The parameters
name
andlanguageCode
are made positional in thesetMyName
method and thegetMyName
method. - Improved documentation.
1.7.0 #
- 🤖 Bot API 6.7 is added!
- Read more here.
- [BREAKING] 👨🏻🔧 - The
answerInlineQuery
will no longer acceptswitchPmParameter
orswitchPmText
parameters. - The example files are updated with dartdoc comments.
1.6.0 #
- ⚗️ BREAKING - The
allowedUpdates
parameter in theLongPolling
object now accepts the list ofUpdateType
instead ofString
- Added methods
requestChat
andrequestUser
inKeyboard
- Added equality operator (
==
) onID
. - Added a test to check equality of two Chat IDs.
- Added missing implementation for
WebhookInfo.toJson
method - Added dartdoc comments for almost every bit of the library.
1.5.6 #
- Fixed an issue with
RawAPI.copyMessage
method. - Updated the
Televerse.command
method to accept aString
orRegExp
as thecommand
parameter.
1.5.5 #
- Changed the
data
parameter to accept bothString
andRegExp
usingPattern
type onTeleverse.callbackQuery
method. - This can simplify the code when you want to listen to a callback query with a specific data.
- The test_bot.dart file in the example folder has been updated to reflect this change.
1.5.4 #
- Added new test cases in the
/test
folder. - There were some
thumb
parameters even though they were changed tothumbnail
in the API documentation. Fixed that. - Fixed an issue with sending media group using local files. More info on #56
- Completely removed the class
MessageOrBoolean
as it was not needed. All methods that return either aMessage
or abool
now split into two methods. One forMessage
and one forbool
. - Updated the
ReplyKeyboardRemove
class to reflect auto set theremove_keyboard
parameter totrue
when theReplyKeyboardRemove
class is created. - Similarly, updated the
ForceReply
class to reflect auto set theforce_reply
parameter totrue
when theForceReply
class is created. - Fixed an issue with
addStickerToSet
method which caused it to fail. More info on #57. - Tested all methods related to Stickers.
- Fixed an issue with
createNewStickerSet
method which caused it to fail. More info on #58.
1.5.3 #
- Fixed an issue with
RawAPI.sendAudio
method. - Added new test files in example folder.
1.5.2 #
- More fixes around the
RawAPI
class. - Added missing implementations for
RawAPI.getCustomEmojiStickers
method.
1.5.1 #
- Fixed an issue with the
RawAPI.sendChatAction
method. - More fixes around the RawAPI class.
1.5.0 #
- 🤖 Bot API 6.6 (March 9, 2021) 🎉
- A bunch of changes as per the Bot API 6.6
1.4.7 #
- Added
Televerse.entity
method to listen to entities in messages. - Improved code quality.
- Removed all the different StreamController classes and replaced them with a single
StreamController<Update>
instance. - All the event streams are now based on the
onUpdate
stream. - Added
Message.getEntityText
method to get the text of the entity. - Updated the televerse_example file to reflect the changes.
1.4.6 #
- Added
Message.isCommand
getter to check if the message is a command. - Added
Televerse.onError
method to listen to unexpected exceptions.
1.4.5 #
- A bunch of refactors on the
on
method.
1.4.4 #
- Added
TeleverseEvent.command
to listen to all commands.
1.4.3 #
- Added helper methods on
File
class to get the file download URL, download URI, file bytes, and finally to download the file. - Added
File.download
method to download the file. - Added
File.getDownloadUrl
method to get the file download URL asString
. - Added
File.getDownloadURI
method to get theUri
object of the file download URL. - Added
File.getBytes
method to get the file bytes this returns aFuture<Uint8List>
. - Added
File.download
method to download the file. This returns aFuture<io.File>
object. - The working example is available at examples/file_download.dart
1.4.2 #
- Fixed an issue with the webhook configuration.
- Made it easier to set a custom fetcher. You don't have to pass the
RawAPI
instance to theFetcher
constructor anymore.
1.4.1 #
- Minor formatting changes.
1.4.0 #
- 🔥 This is breaking change.
- Added the
RawAPI
class to access the raw Telegram Bot API methods. - Added a
api
getter toTeleverse
class to access theRawAPI
class. - Now it's even easier to access and differentiate between the Telegram Bot API methods and Televerse methods.
- Added dartdoc comments to all the classes.
1.3.1 #
- Added shorthand methods to setup listners for
/start
,/help
,/settings
commands. - You can now use
Televerse.start
,Televerse.help
, andTeleverse.settings
to listen for these commands. - All these methods accepts a
MessageHandler
as a parameter which is a type alias forFutureOr<void> Function(MessageContext)
. - Added
MessageHandler
,CallbackQueryHandler
, andInlineQueryHandler
type aliases.
1.3.0 #
- Telegram Bot API 6.5 (February 3, 2023)
- This includes addition of classes like
KeyboardButtonRequestUser
,KeyboardButtonRequestChat
,UserShared
andChatShared
. - Added some missing implementations for Bot API 6.4
1.2.6 #
- Added
Televerse.instance
getter to get the last instance ofBot
created. - Added
ChatID.chat
getter to get theChat
object from theChatID
object. - Added optional
RegExp? regex
parameter toTeleverse.command
method.
1.2.5 #
- Added
startParameter
getter toMessageContext
class. This will be automatically set when the bot is started by a user clicking on a deep link such ast.me/MyBot?start=12345
. - Added more tests.
- Whole lot of refactoring.
1.2.4 #
- New
InlineKeyboard
class is added. This can be very useful in creatingInlineKeyboardMarkup
. - New
Keyboard
class to help with creatingReplyKeyboardMarkup
easily and quickly. - Updated
ReplyKeyboardMarkup
andKeyboardButton
as per the API Documentation (some of the optional parameters were required in the previous version). - Fixed an issue that was causing
sendMessage
to not work when used with any reply markup.
1.2.3 #
- Added documentation for all most all classes and Televerse things.
1.2.2 #
- Added
MessageMixin
to supportMessageContext
. - Added
replyWithPhoto
,replyWithVideo
,replyWithAudio
,replyWithDocument
,replyWithVideoNote
,replyWithVoice
,replyWithVenue
,replyWithContact
,replyWithPoll
,replyWithDice
,replyWithChatAction
,replyWithGame
,replyWithAnimation
,replyWithSticker
,editMessageText
, anddeleteMessage
methods toMessageContext
. - Added
ManagementMixin
to supportMessageContext
. - Added
banAuthor
,banSenderChat
,deleteChatPhoto
,promoteAuthor
,restrictAuthor
,exportChatInviteLink
,revokeChatInviteLink
,pinChatMessage
,unpinChatMessage
,getChat
,getChatAdministrators
,getChatMember
, andleaveChat
onManagementMixin
. - Both
MessageMixin
andManagementMixin
are now available onMessageContext
. - Added
CallbackQueryMixin
to supportCallbackQueryContext
. CallbackQueryContext
now hasanswer
andeditMessage
methods available.- Added
InlineQueryMixin
to supportInlineQueryContext
. InlineQueryContext
now hasanswer
, andanswerWithArticles
methods available.
1.2.1 #
- Fixed an issue with the
on
method that it's not getting called on any filters. - Made official Televerse Wiki available at the GitHub repo.
1.2.0 #
- Added
TeleverseEvent
enum to make it easy to listen for particular events. - 🔥 Added
on
method accessible onTeleverse
class. This method can be used to listen for particular events as listed inTeleverseEvent
enum. - Edited method
Televerse.callbackQuery
to acceptRegExp? regex
as an optional parameter. This can be used to listen for callback queries that match the passed regex. - Updated RAW API to return
Message
instead ofMessageContext
. - Updated
Context
class to have the associatedUpdate
object with it. - Update
MessageContextOrBoolean
class to beMessageOrBoolean
in places a method sending eitherMessage
orbool
, such aseditMessageLiveLocation
etc.
1.1.0 #
- Added a lot new methods to
Televerse
class:command
- Can be used to listen for Messages that contain the passed commandtext
- This is a very basic method, which can be used to listen to messages that contain particular text content in itcallbackQuery
- Can be used to listen for callbackQuery updates.chatType
andchatTypes
- Can be used to register callbacks for messages received on particular chat types.filter
- Filter is an advanced method that can be used to listen for messages that pass a given predicate condition.hears
- One of the best picks. Users can pass a RegEx pattern and listen for messages that contain a match.
- Added
MessageContext.id
to get the Chat ID easily - Improved examples
1.0.1 #
- Initial release
- We're live at Bot API 6.4
MessageContext
class added withreply
method
0.0.1 #
- On development release. Completely new project.