Skip to content

GramIO API Reference / @gramio/keyboards/dist / InputMessageContent

Class: InputMessageContent ​

Defined in: keyboards/index.d.ts:697

This object represents the content of a message to be sent as a result of an inline query.

Example ​

typescript
bot.api.answerInlineQuery({
	inline_query_id: context.id,
	results: [
		InlineQueryResult.article(
			"id-1",
			"some article",
			InputMessageContent.text("my article"),
		),
	],
});

Documentation

Constructors ​

Constructor ​

new InputMessageContent(): InputMessageContent

Returns ​

InputMessageContent

Methods ​

contact() ​

static contact(phoneNumber, firstName, options?): TelegramInputContactMessageContent

Defined in: keyboards/index.d.ts:721

Represents the content of a contact message to be sent as the result of an inline query.

Documentation

Parameters ​

ParameterType
phoneNumberstring
firstNamestring
options?Omit<TelegramInputContactMessageContent, "phone_number" | "first_name">

Returns ​

TelegramInputContactMessageContent


invoice() ​

static invoice(options): TelegramInputInvoiceMessageContent

Defined in: keyboards/index.d.ts:727

Represents the content of an invoice message to be sent as the result of an inline query.

Documentation

Parameters ​

ParameterType
optionsTelegramInputInvoiceMessageContent

Returns ​

TelegramInputInvoiceMessageContent


location() ​

static location(latitude, longitude, options?): TelegramInputLocationMessageContent

Defined in: keyboards/index.d.ts:709

Represents the content of a location message to be sent as the result of an inline query.

Documentation

Parameters ​

ParameterType
latitudenumber
longitudenumber
options?Omit<TelegramInputLocationMessageContent, "latitude" | "longitude">

Returns ​

TelegramInputLocationMessageContent


text() ​

static text(text, options?): TelegramInputTextMessageContent

Defined in: keyboards/index.d.ts:703

Represents the content of a text message to be sent as the result of an inline query.

Documentation

Parameters ​

ParameterType
textstring | { toString: string; }
options?Omit<TelegramInputTextMessageContent, "message_text">

Returns ​

TelegramInputTextMessageContent


venue() ​

static venue(options): TelegramInputLocationMessageContent

Defined in: keyboards/index.d.ts:715

Represents the content of a venue message to be sent as the result of an inline query.

Documentation

Parameters ​

ParameterType
optionsTelegramInputVenueMessageContent

Returns ​

TelegramInputLocationMessageContent