feat: add sending message option and command to anyone for better experience and automation flow#269
Open
Msameim181 wants to merge 4 commits intoNekmo:masterfrom
Open
feat: add sending message option and command to anyone for better experience and automation flow#269Msameim181 wants to merge 4 commits intoNekmo:masterfrom
Msameim181 wants to merge 4 commits intoNekmo:masterfrom
Conversation
…erience and automation flow
…ding them This commit adds a new class called TelegramMessageClient to the telegram_upload/client/telegram_message_client.py file. The class extends the TelegramClient class from the telethon library and provides methods for sending messages and forwarding them to multiple destinations. The TelegramMessageClient class includes the following methods: - forward_to: Forwards a message to multiple destinations. - send_one_message: Sends a single message to an entity with optional retries and parse mode. - send_messages: Sends multiple messages to an entity with optional parse mode and forwarding. This new functionality improves the experience and automation flow for sending messages using the Telegram API.
This commit adds the TelegramMessageClient class to the TelegramManagerClient, allowing for sending messages and forwarding them. This enhances the functionality and automation flow of the application. Refactor the TelegramManagerClient class to inherit from TelegramUploadClient, TelegramDownloadClient, and TelegramMessageClient.
Add the option to forward messages to a chat or user by specifying the alias, id, username, mobile, or id. This option can be used multiple times. Refactor the `message` function in `telegram_upload/management.py` to include the new `forward` option. The function now accepts the `forward` option as a command-line argument and passes it to the `send_messages` method of the `TelegramManagerClient` class. This commit also includes a minor fix to handle the `parse_mode` option when it is set to 'text'.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
feature: adding sending message option and command to anyone for a better experience and automation flow.