Airgram

Guides
/
/
Methods

api.sendBotStartMessage()

Invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message

Parameters SendBotStartMessageParams:

NameTypeDescription
botUserIdnumber Identifier of the bot
chatIdnumber Identifier of the target chat
parameterstring A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots#deep-linking)
Returns ApiResponse interface:
interface ApiResponse {
  _: 'sendBotStartMessage' | 'error'
  airgram: Airgram
  request: {
    method: 'sendBotStartMessage'
    params: SendBotStartMessageParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}