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