Overview
Osmium Chat Protocol provides operations to modify existing messages, remove them, and forward messages to other chats. These operations require appropriate permissions in the target chat.Edit Message
TheEditMessage request allows you to modify the content, media, and entities of an existing message.
Proto Definition
Request Fields
The chat containing the message to edit. Must match the original message’s chat.
The ID of the message to edit. Must be a message you authored (unless you have moderator permissions).Type: Snowflake ID representing a Message
The new text content for the message. If provided, replaces the existing message text.Leave unset to keep the existing message text unchanged.
Set to
true to remove all media attachments from the message.If false and media is provided, the media array replaces existing attachments.New media attachments that replace the existing media (unless
remove_media is true).If empty and remove_media is false, existing media is preserved.New formatting entities. Replaces existing entities if:
- The array is not empty, OR
- The
messagefield is set
Examples
Edit Message Text Only
Remove All Media
Edit Text and Update Formatting
Delete Message
TheDeleteMessage request permanently removes one or more messages from a chat.
Proto Definition
Request Fields
The chat containing the messages to delete.
Array of message IDs to delete. You can delete multiple messages in a single request.Type: Array of Snowflake IDs representing MessagesYou must have permission to delete these messages (either as the author or with moderator permissions).
Examples
Delete a Single Message
Delete Multiple Messages
Forward Message
TheForwardMessage request copies one or more messages from one chat to another, preserving the original content and author information.
Proto Definition
Request Fields
The destination chat where messages will be forwarded to.
The source chat where the messages are currently located.
Array of message IDs to forward from the source chat to the destination chat.Type: Array of Snowflake IDs representing MessagesMessages will be forwarded in the same order as specified.
Examples
Forward a Single Message to Another User
Forward Multiple Messages to a Channel
Forward to Saved Messages
Notes
Edit Message
- Edited messages display an “edited” indicator with the edit timestamp
- You can only edit messages you authored (unless you have moderator permissions)
- Setting
messagewill update the text and reset entities unless new entities are provided - Media replacement is all-or-nothing; use
remove_mediato clear attachments
Delete Message
- Deletions are permanent and cannot be undone
- You can delete your own messages or messages in chats where you have delete permissions
- Deleted messages are removed for all participants
- Bulk deletion is supported for moderation purposes
Forward Message
- Forwarded messages retain their original author attribution
- The
forwardfield in the message indicates it was forwarded - You must have permission to read messages in the source chat and send messages in the destination chat
- Media attachments are preserved in forwarded messages