messages.searchGifs

Search for GIFs

Example

const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');

const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
    const result = await client.invoke(new Api.messages.searchGifs({
        q: 'random string here',
        offset: 4235662,
        }));
    console.log(result); // prints the result
})();

TL schema

Method schema is available as of layer 114. Switch »

Parameters

Name

Type

Description

q

Text query

offset

Offset for pagination »

Result

messages.FoundGifs

Possible errors

Code

Type

Description

400

SEARCH_QUERY_EMPTY

The search query is empty

Can bots use this methd ?

yes

How to fetch results from large lists of objects.

Last updated