Skip to content

GramIO API Reference / @gramio/contexts/dist / InlineQueryContext

Class: InlineQueryContext<Bot>

Defined in: contexts/index.d.ts:6680

This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.

Documentation

Extends

Type Parameters

Type Parameter
Bot extends BotLike

Constructors

Constructor

new InlineQueryContext<Bot>(options): InlineQueryContext<Bot>

Defined in: contexts/index.d.ts:6683

Parameters

ParameterType
optionsInlineQueryContextOptions<Bot>

Returns

InlineQueryContext<Bot>

Overrides

Context.constructor


Constructor

new InlineQueryContext(...args): InlineQueryContext

Defined in: contexts/index.d.ts:6680

Parameters

ParameterType
...argsany[]

Returns

InlineQueryContext

Overrides

Context<Bot>.constructor

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
botpublicBot-Context.botcontexts/index.d.ts:5240
payloadpublicTelegramInlineQueryThe raw data that is used for this ContextInlineQuery.payloadcontexts/index.d.ts:6682
update?publicTelegramUpdate-Context.updatecontexts/index.d.ts:5242
updateId?publicnumber-Context.updateIdcontexts/index.d.ts:5241
updateTypeprotectedUpdateName-Context.updateTypecontexts/index.d.ts:5243

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

Defined in: contexts/index.d.ts:5246

MDN

Returns

string

Inherited from

Context.[toStringTag]


from

Get Signature

get from(): User

Defined in: contexts/index.d.ts:4473

Sender

Returns

User

Inherited from

InlineQuery.from


id

Get Signature

get id(): string

Defined in: contexts/index.d.ts:4471

Unique identifier for this query

Returns

string

Inherited from

InlineQuery.id


location

Get Signature

get location(): Location

Defined in: contexts/index.d.ts:4475

Sender location, only for bots that request user location

Returns

Location

Inherited from

InlineQuery.location


offset

Get Signature

get offset(): string

Defined in: contexts/index.d.ts:4479

Offset of the results to be returned, can be controlled by the bot

Returns

string

Inherited from

InlineQuery.offset


query

Get Signature

get query(): string

Defined in: contexts/index.d.ts:4477

Text of the query (up to 256 characters)

Returns

string

Inherited from

InlineQuery.query


senderId

Get Signature

get senderId(): number

Defined in: contexts/index.d.ts:6685

Sender's ID

Returns

number

Methods

answer()

answer(results, params?): Promise<true>

Defined in: contexts/index.d.ts:6691

Answers to inline query. An alias for answerInlineQuery

Parameters

ParameterType
resultsTelegramInlineQueryResult[]
params?Partial<AnswerInlineQueryParams>

Returns

Promise<true>


answerInlineQuery()

answerInlineQuery(results, params?): Promise<true>

Defined in: contexts/index.d.ts:6689

Answers to inline query

Parameters

ParameterType
resultsTelegramInlineQueryResult[]
params?Partial<AnswerInlineQueryParams>

Returns

Promise<true>


clone()

clone(options?): InlineQueryContext

Defined in: contexts/index.d.ts:5934

Parameters

ParameterType
options?InlineQueryContextOptions

Returns

InlineQueryContext

Inherited from

CloneMixin.clone


hasLocation()

hasLocation(): this is Require<InlineQueryContext<Bot>, "location">

Defined in: contexts/index.d.ts:6687

Checks if query has location property

Returns

this is Require<InlineQueryContext<Bot>, "location">


is()

is<T>(rawTypes): this is InstanceType<ContextsMapping<Bot>[T]> & GetDerives<Bot, T> & (IsAny<Bot["__Derives"]> extends true ? {} : Bot["__Derives"] extends {} ? Bot["__Derives"]["global"] & Bot["__Derives"][T] : {})

Defined in: contexts/index.d.ts:5249

Type Parameters

Type Parameter
T extends UpdateName

Parameters

ParameterType
rawTypesMaybeArray<SoftString<T>>

Returns

this is InstanceType<ContextsMapping<Bot>[T]> & GetDerives<Bot, T> & (IsAny<Bot["__Derives"]> extends true ? {} : Bot["__Derives"] extends {} ? Bot["__Derives"]["global"] & Bot["__Derives"][T] : {})

Inherited from

Context.is