Skip to content

Contacts.pm

Denis T edited this page Feb 8, 2017 · 3 revisions

Description

Encapsulates work with bot contacts list.

API

new(api): object

Returns module instance.

add(user_id, contact): undef

Adds user to contact list.

fullname(user_id): string

Returns user full name by id (first name + last name).

  • user_id - Telegram user id.

send(chat_id, user_id): undef

Sends contact of user_id to chat chat_id. If contact of user_id is not defined does nothing.

  • chat_id - Telegram chat id.
  • user_id - Telegram user id.

Tests

No tests.

Clone this wiki locally