Overview
NewMessage represents an incoming message update. Itβs the most commonly used update type and provides rich methods for interacting with messages.
Structure
Basic Properties
Message Information
Message ID
Get message text
Message timestamp (Unix time)
Sender Information
Get senderβs user ID
Get full sender user object
Direct access to sender object (may be nil)
Chat Information
Get chat ID (works for users, groups, channels)
Get channel ID with -100 prefix
Get chat type:
user, chat, channelReply Methods
Sending Replies
Album Methods
Message Actions
Edit & Delete
Forward & Pin
Message Checks
Chat Type Checks
- Private
- Group
- Channel
Message Type Checks
- Command
- Reply
- Forward
- Media