teleproto - v1.229.0
    Preparing search index...

    Class InlineQuery

    Occurs when a user sends an inline query to your bot (e.g.,

    query).

    This event only works for bot accounts.

    client.addEventHandler(async (event: InlineQueryEvent) => {
    console.log(`Query: ${event.text}`);

    // Respond with results
    await event.answer([
    event.builder.article("Title", { text: "Content", description: "Description" })
    ]);
    }, new InlineQuery({}));

    // With pattern matching
    client.addEventHandler(async (event: InlineQueryEvent) => {
    console.log(`Matched: ${event.patternMatch?.[1]}`);
    }, new InlineQuery({ pattern: /search (.+)/ }));

    Hierarchy

    • EventBuilder
      • InlineQuery
    Index
    blacklistChats: boolean
    chats?: string[]
    func?: CallableFunction
    resolved: boolean