Send contact

You can send a contact (phone number, first name, last name, user if of the user)

Send contact

To send a contact, use Contact class

Contact class take arguments:

app.controller.ts
import { Controller, Contact, MessageSend, OnCommand } from 'nestgram';
import { AppService } from './app.service';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}

  @OnCommand('start')
  helloMessage(): MessageSend {
    return new MessageSend(new Contact('(555) 555-1234', 'Big Smoke'))
  }
}

Last updated