GramJS

stickers.SuggestShortName

Suggests a short name for a given stickerpack name

Example

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

const session = new StringSession(""); // You should put your string session here
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
  await client.connect(); // This assumes you have already authenticated with .start()

  const result = await client.invoke(
    new Api.stickers.SuggestShortName({
      title: "My very normal title",
    })
  );
  console.log(result); // prints the result
})();
import { Api, TelegramClient } from "telegram";
import { StringSession } from "telegram/sessions";

const session = new StringSession(""); // You should put your string session here
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
  await client.connect(); // This assumes you have already authenticated with .start()

  const result: Api.stickers.SuggestedShortName = await client.invoke(
    new Api.stickers.SuggestShortName({
      title: "My very normal title",
    })
  );
  console.log(result); // prints the result
})();

Parameters

NameTypeDescription
titlestringSticker pack name

Result

stickers.SuggestedShortName

Possible errors

CodeTypeDescription
400TITLE_INVALIDThe specified stickerpack title is invalid.

Can bots use this method?

No