You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello, add some methods and classes that I found useful or missing, such as the MessageEntity class or methods like is_bot? in User and methods to obtain mentions, commands, etc. in message.
@eljojo Yes of course, the changes that I made were basically:
Added missing attributes is_bot and language_code to User and the method full_name.
Create the class MessageEntity for the attribute entities from Message.
With the class MessageEntity its also added to Message methods like get_mentions, get_bot_commands, get_text_links, etc. that return an array of strings with the text of the message from the specified position in the offset of each entity, there is also his singular version for example get_mention that returns to the first mention it founds.
Added missing attributes to Message like entities, edit_date, media_group_id, new_chat_members, forward_from etc, only needs to add the attributes for which it is necessary to create their respective classes.
Added the attributes edited_message, channel_post and edited_channel_post to Update along with the get_message method that returns the update either message, edited_message, channel_post or edited_channel_post.
Change the class Client to Connection and in this just add the method request and other methods like get and post that return an instance of Result and use methods like get to make the requests to obtain data such as updates or the use post to send data such as sending a message with the bot.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello, add some methods and classes that I found useful or missing, such as the MessageEntity class or methods like is_bot? in User and methods to obtain mentions, commands, etc. in message.