The msg Variable¶
In TBL, msg is a simplified version of update that is available only for message updates.
It is designed to make working with normal messages easier.
How msg Works¶
- When the update type is a message,
msgis available msgcontains the same object asupdate.message- If the update is not a message,
msgis not available
This means you don’t need to access the full update object for common message-based bots.
Important Notes¶
msgis available only for message updates- It is read-only
- It exists only during command execution
For simple bots that mainly handle messages, msg is often more convenient than using update.message directly.