I'm thinking about a bigger future for botogram. Please give your opinions on the issue!
https://github.com/pietroalbini/botogram/issues/52
https://github.com/pietroalbini/botogram/issues/52
The first new feature of botogram 0.3 landed on master! You can now easily react when a chat is not available (for example the user blocked your bot).
Check out the documentation: https://botogram.pietroalbini.io/docs/dev/unavailable-chats
If you have any idea for the future of botogram or you want to discuss this change, join the @botogram_users group!
Check out the documentation: https://botogram.pietroalbini.io/docs/dev/unavailable-chats
If you have any idea for the future of botogram or you want to discuss this change, join the @botogram_users group!
New thing I will add in botogram 0.3: conversations (aka forced replies and keyboards on steroids). Please share any idea you have in the issue:
https://github.com/pietroalbini/botogram/issues/53
https://github.com/pietroalbini/botogram/issues/53
GitHub
Add support for tracking conversations · Issue #53 · pietroalbini/botogram
Conversation tracking is the way I plan to implement a proper support for keyboards (as a layer above those) and forced replies.
@bot.command("support")
def support_command(conversation, chat, mes...
@bot.command("support")
def support_command(conversation, chat, mes...
Some other changes are going to happen in botogram 0.3: this will be the new shared memory:
https://github.com/pietroalbini/botogram/issues/54
https://github.com/pietroalbini/botogram/issues/54
GitHub
Rework shared memory · Issue #54 · pietroalbini/botogram
The current status of shared memory is a real mess, and I really need to solve it:
First of all, you can't easily use sub-dictionaries because they're not synchronized, and you need to do something...
First of all, you can't easily use sub-dictionaries because they're not synchronized, and you need to do something...
By the way, new features introduced today like groups management will be included in botogram 0.3.
A bunch of new things were added in the Bot API 2.0 update of the Telegram API! All the new features (except for inline queries and maybe keyboards if I have time to implement them in a timely manner after the other things) will be included in botogram 0.3!
Meta issue which tracks the progress for implementing everything:
https://github.com/pietroalbini/botogram/issues/61
Meta issue which tracks the progress for implementing everything:
https://github.com/pietroalbini/botogram/issues/61
The first batch of new features from the Bot API 2.0 update landed on master: the renamed properties are now renamed in botogram (with the old syntax deprecated), and support for editing messages was added. If you want to try them out build botogram from source.
There are lots of new things to implement, and I'm quite busy with real-life stuff at the moment, so if you want to help out just take an unassigned issue!
https://github.com/pietroalbini/botogram/issues/61
Discussion group: @botogram_users
There are lots of new things to implement, and I'm quite busy with real-life stuff at the moment, so if you want to help out just take an unassigned issue!
https://github.com/pietroalbini/botogram/issues/61
Discussion group: @botogram_users
Support for
Discussion group: @botogram_users
Message.pinned_message also landed on master. Unfortunately, the following ones will be very busy weeks for me, so I can't guarantee new features...Discussion group: @botogram_users
I'm starting to get a little more free time, but I'm still quite busy. In the meantime I fixed a small compatibility error in the development version, so if you're using it upgrade :)
Discussion group: @botogram_users
Discussion group: @botogram_users
A branch I was working on for some time was just merged on master: support for
The implementation I created is quite different than the one created by Telegram: for example, you don't get the offset of the entity and its length but just the text of it, plain text is included as an entity and types are a little more sane.
I'm slowly getting more free time, but this week should be the last one with big school projects! I'll probably also release botogram 0.3 as soon as compatibility with the new features introduced by Telegram is reached, and delay keyboards and conversations for 0.4 (I don't want you to wait too much for these features!).
Discussion group: @botogram_users
Message.parsed_text (introduced in the Bot API 2.0 update)!The implementation I created is quite different than the one created by Telegram: for example, you don't get the offset of the entity and its length but just the text of it, plain text is included as an entity and types are a little more sane.
I'm slowly getting more free time, but this week should be the last one with big school projects! I'll probably also release botogram 0.3 as soon as compatibility with the new features introduced by Telegram is reached, and delay keyboards and conversations for 0.4 (I don't want you to wait too much for these features!).
Discussion group: @botogram_users
Sorry for the spare updates but I'm not feeling so good in this weeks (damn you spring!).
Today I fixed the ugly behavior and messages when two instances of the same bot were running: Telegram doesn't support that, and botogram was just spamming a lot of messages before. Now, it tells you what's wrong, and it quietly checks when the other instances are closed, and then it starts working again.
Discussion group: @botogram_users
Today I fixed the ugly behavior and messages when two instances of the same bot were running: Telegram doesn't support that, and botogram was just spamming a lot of messages before. Now, it tells you what's wrong, and it quietly checks when the other instances are closed, and then it starts working again.
Discussion group: @botogram_users
The old way to hide commands from
This allows components to force a specific command to be hidden, and also keeps the code cleaner by putting those information near the command definition.
Discussion group: @botogram_users
/help (adding them to the bot.hide_commands list) was ugly and error-prone, so I decided to change the whole thing. Starting with botogram 0.3, the way to hide commands will be to provide the hidden=True argument either to @bot.command or self.add_command (for components).This allows components to force a specific command to be hidden, and also keeps the code cleaner by putting those information near the command definition.
Discussion group: @botogram_users
Today two small changes landed on master: support for messages forwarded from channels and a new
I'm going to delay everything but the new things introduced in the recent (2.0 and 2.1) updates of the Bot API, so you can use the new features as soon as possible. Unfortunately, this means the new shared state, keyboards and inlines are delayed until botogram 0.4.
Discussion group: @botogram_users
Chat.leave() method.I'm going to delay everything but the new things introduced in the recent (2.0 and 2.1) updates of the Bot API, so you can use the new features as soon as possible. Unfortunately, this means the new shared state, keyboards and inlines are delayed until botogram 0.4.
Discussion group: @botogram_users
No more waiting when you restart your bot after some time! A code change in botogram 0.3 makes the whole backlog-skipping project instantaneous.
https://github.com/pietroalbini/botogram/commit/02a98fe9de1ed9fb0a2708e65cd801ef9466277c
Discussion group: @botogram_users
https://github.com/pietroalbini/botogram/commit/02a98fe9de1ed9fb0a2708e65cd801ef9466277c
Discussion group: @botogram_users
I just redesigned from scratch the API for keyboards and buttons (inline keyboards), which will be implemented in botogram 0.4. If you want to take a peek at it, check it out on GitHub!
https://github.com/pietroalbini/botogram/issues/66
Discussion group: @botogram_users
https://github.com/pietroalbini/botogram/issues/66
Discussion group: @botogram_users
A bunch of new things landed on master today!
You can now get the list of administrators of a chat. If your bot is meant to be added in groups to aid moderating, being able to accept certain commands only from appointed administrators is quite helpful. Check out the documentation for it:
https://botogram.pietroalbini.io/docs/dev/api/telegram/#botogram.Chat.admins
If the command you want to protect is really dangerous, and only the chat creator should be allowed to use it, don't worry! You can check if it's him by comparing the sender with
https://botogram.pietroalbini.io/docs/dev/api/telegram/#botogram.Chat.creator
Also, you might want to track statistics about how many users are in your group or subscribed to your channel. It's now easy to get that information with
https://botogram.pietroalbini.io/docs/dev/api/telegram/#botogram.Chat.members_count
Checking if someone is kicked from the chat or is an admin of it was difficult before, because you had to track that down by yourself. Now you can just check the status in the group of an user by using
https://botogram.pietroalbini.io/docs/dev/api/telegram/#botogram.Chat.status_of
Finally, it's now possible to compare (for example
Discussion group: @botogram_users
You can now get the list of administrators of a chat. If your bot is meant to be added in groups to aid moderating, being able to accept certain commands only from appointed administrators is quite helpful. Check out the documentation for it:
https://botogram.pietroalbini.io/docs/dev/api/telegram/#botogram.Chat.admins
If the command you want to protect is really dangerous, and only the chat creator should be allowed to use it, don't worry! You can check if it's him by comparing the sender with
chat.creator. Check out the documentation for it:https://botogram.pietroalbini.io/docs/dev/api/telegram/#botogram.Chat.creator
Also, you might want to track statistics about how many users are in your group or subscribed to your channel. It's now easy to get that information with
chat.members_count! Check out the documentation for it:https://botogram.pietroalbini.io/docs/dev/api/telegram/#botogram.Chat.members_count
Checking if someone is kicked from the chat or is an admin of it was difficult before, because you had to track that down by yourself. Now you can just check the status in the group of an user by using
chat.status_of(). Check out the documentation for it:https://botogram.pietroalbini.io/docs/dev/api/telegram/#botogram.Chat.status_of
Finally, it's now possible to compare (for example
message.sender == chat.creator) most of the upstream objects, like User, Chat, Message and many more. This allows you to do nice things like if message.sender in chat.admins:.Discussion group: @botogram_users
A few new features landed yesterday on master!
It will be possible in botogram 0.3 to process edits of the messages your bot knows about. Check out the documentation for it:
https://botogram.pietroalbini.io/docs/dev/api/bot/#botogram.Bot.message_edited
Also, a small bug was fixed, and now you shouldn't have more troubles if you use any
Discussion group: @botogram_users
It will be possible in botogram 0.3 to process edits of the messages your bot knows about. Check out the documentation for it:
https://botogram.pietroalbini.io/docs/dev/api/bot/#botogram.Bot.message_edited
Also, a small bug was fixed, and now you shouldn't have more troubles if you use any
> or < in your commands' docstrings but you don't have any HTML syntax in there: your docstrings will be escaped automatically, and the /help command shouldn't crash anymore.Discussion group: @botogram_users
Big changes today in the development version of botogram (soon the 0.3 release).
First of all, a regression of a fix made two days ago was fixed, so the
A new method
https://botogram.pietroalbini.io/docs/dev/api/bot/#botogram.Bot.chat
Also, support for sending contacts was added. You can now send phone numbers to your users easily, with the
Finally, I'm updating the documentation theme so the API docs looks better, stay tuned!
Changelog:
https://botogram.pietroalbini.io/docs/dev/changelog/0.3/
Discussion group: @botogram_users
First of all, a regression of a fix made two days ago was fixed, so the
/help command should be stable again.A new method
Bot.chat() was added, which allows you to get the representation of a chat from its ID. This allows you to get updated information about it, and also to directly send messages to that chat. Because of that, all the Bot.send / Bot.send_* methods are now deprecated, but don't worry, botogram will tell you where to update your code when you run the bot. Check out its documentation:https://botogram.pietroalbini.io/docs/dev/api/bot/#botogram.Bot.chat
Also, support for sending contacts was added. You can now send phone numbers to your users easily, with the
User.send_contact, Chat.send_contact and Message.reply_with_contact methods. Check out their documentation if you want to know a bit more about them.Finally, I'm updating the documentation theme so the API docs looks better, stay tuned!
Changelog:
https://botogram.pietroalbini.io/docs/dev/changelog/0.3/
Discussion group: @botogram_users
Support for moderating group chats just landed on master, and is scheduled to release in the almost-ready botogram 0.3.
Public supergroups will become messy sonner or later, and being able to programmatically ban noisy users is invaluable. Check out the narrative documentation about groups management, with working, real-world examples:
https://botogram.pietroalbini.io/docs/dev/groups-management/
Changelog:
https://botogram.pietroalbini.io/docs/dev/changelog/0.3/
Discussion group: @botogram_users
Public supergroups will become messy sonner or later, and being able to programmatically ban noisy users is invaluable. Check out the narrative documentation about groups management, with working, real-world examples:
https://botogram.pietroalbini.io/docs/dev/groups-management/
Changelog:
https://botogram.pietroalbini.io/docs/dev/changelog/0.3/
Discussion group: @botogram_users