Sending messages correctly
How to send message correctly in a controller handler
Sending message as answer
In this code in start
method, you can see when the user writes command /start, the user gets the message Hello, world!
. What's method returns will be sent to the user
MessageSend class-method is a wrapper for the message: it allows you to add keyboard, options, photo, or media to the message
If you don't know what will return your method (e.g. MessageSend or Edit) you can use MessageCreator class as return type (import from root)
MessageSend class-method take arguments:
Content (media or text)
Required
Optional
Optional
Sending message line
You can also send more than one message, use the .next
method on the MessageSend class
Last updated