Skip to content

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

Class: InputMessageContent

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

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:695

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:701

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:683

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:677

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

Documentation

Parameters

ParameterType
textstring
options?Omit<TelegramInputTextMessageContent, "message_text">

Returns

TelegramInputTextMessageContent


venue()

static venue(options): TelegramInputLocationMessageContent

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

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

Documentation

Parameters

ParameterType
optionsTelegramInputVenueMessageContent

Returns

TelegramInputLocationMessageContent