Send a message with messages->sendMessage:
use danog\MadelineProto\API;
$api = new API('session.file');
// Message to a bot:
$api->messages->sendMessage(['peer' => '@btc_tickets_bot', 'message' => 'Hello! How are you?']);
// Message to a user:
$api->messages->sendMessage(['peer' => '@AlexxxxMz', 'message' => 'Hello! When is the pump?']);
For peer you can pass a username in @username form. That works the same way for users and for bots.
Andrew Dorokhov