Skip to content
Ilya Perkovec edited this page Sep 2, 2016 · 2 revisions

Class: Peer

Instance Methods

peer.send(message)

  • message String
connection.on('message', msg => {
  msg.to.send('pong');
});

Send message.

peer.sendImage(path)

  • path String
connection.on('message', msg => {
  msg.to.sendImage('telegram.png');
});

Send image from path.

peer.sendDocument(path)

  • path String
connection.on('message', msg => {
  msg.to.sendDocument('telegram.txt');
});

Send document from path.

Instance Properties

  • peer_id Integer
  • id String
  • phone String
  • peer_type String
  • flags Integer
  • first_name String
  • last_name String
  • print_name String
  • username String
  • title String
  • members_num Integer
  • kicked_count Integer
  • participants_count Integer
  • admins_count Integer
Clone this wiki locally