-
Notifications
You must be signed in to change notification settings - Fork 12
Message
Ilya Perkovec edited this page Sep 2, 2016
·
2 revisions
-
messageString
connection.on('message', msg => {
msg.send('pong');
});Send message.
-
peerString
connection.on('message', msg => {
msg.forward(msg.to.print_name);
});Forward current message to peer.
-
messageString
connection.on('message', msg => {
msg.reply('pong');
});Reply to current message with message.
Delete current message.
connection.on('message', msg => {
msg.deleteMsg();
});-
pathString
connection.on('message', msg => {
msg.sendImage('telegram.png');
});Send image from path.
-
pathString
connection.on('message', msg => {
msg.sendDocument('telegram.txt');
});Send document from path.