Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I edit message? #65

Open
Eikosa opened this issue Jan 15, 2025 · 1 comment
Open

How can I edit message? #65

Eikosa opened this issue Jan 15, 2025 · 1 comment

Comments

@Eikosa
Copy link

Eikosa commented Jan 15, 2025

I want a message I wrote to be edited again, but no matter what I do, I keep getting an error, how can I do that?

@krypton-byte
Copy link
Owner

examples:

        case "edit_message":
            text = "Hello World"
            id_msg = None
            for i in range(1, len(text) + 1):
                if id_msg is None:
                    msg = await client.send_message(
                        message.Info.MessageSource.Chat,
                        Message(
                            conversation=text[:i]
                        )
                    )
                    id_msg = msg.ID
                await client.edit_message(
                    message.Info.MessageSource.Chat,
                    id_msg,
                    Message(
                        conversation=text[:i]
                    )
                )
       case "edit_message":
           text = "Hello World"
           id_msg = None
           for i in range(1, len(text) + 1):
               if id_msg is None:
                   msg = client.send_message(
                       message.Info.MessageSource.Chat,
                       Message(
                           conversation=text[:i]
                       )
                   )
                   id_msg = msg.ID
               client.edit_message(
                   message.Info.MessageSource.Chat,
                   id_msg,
                   Message(
                       conversation=text[:i]
                   )
               )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants