Skip to content

getMyShortDescription

Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.

Parameters

language_codeStringOptional
A two-letter ISO 639-1 language code or an empty string

Returns

On success, the BotShortDescription object is returned.

GramIO Usage

ts
// Get the bot's default short description (no language filter)
const 
result
= await
bot
.
api
.
getMyShortDescription
({});
console
.
log
(
result
.
short_description
);
ts
// Get the short description localised for Russian-speaking users
const 
ruResult
= await
bot
.
api
.
getMyShortDescription
({
language_code
: "ru" });
console
.
log
("RU short description:",
ruResult
.
short_description
);
ts
// Read short descriptions for several locales in parallel
const [
defaultShort
,
enShort
,
ruShort
] = await
Promise
.
all
([
bot
.
api
.
getMyShortDescription
({}),
bot
.
api
.
getMyShortDescription
({
language_code
: "en" }),
bot
.
api
.
getMyShortDescription
({
language_code
: "ru" }),
]);
console
.
log
("Default:",
defaultShort
.
short_description
);
console
.
log
("EN: ",
enShort
.
short_description
);
console
.
log
("RU: ",
ruShort
.
short_description
);
ts
// Audit short description coverage across supported locales
async function 
auditShortDescriptions
(
locales
: string[]) {
for (const
lang
of
locales
) {
const {
short_description
} = await
bot
.
api
.
getMyShortDescription
({
language_code
:
lang
,
}); const
status
=
short_description
? "OK" : "MISSING";
console
.
log
(`[${
lang
}] ${
status
}: ${
short_description
}`);
} } await
auditShortDescriptions
(["en", "ru", "de", "fr"]);

Errors

CodeErrorCause
401Unauthorized: invalid token specifiedBot token is wrong or revoked — check the BOT_TOKEN environment variable
429Too Many Requests: retry after NRate limit hit — check retry_after, use the auto-retry plugin

Tips & Gotchas

  • Both parameters are optional — pass an empty object {} for the default. Omitting language_code (or passing an empty string) returns the language-agnostic fallback short description shown to users whose language has no dedicated override.
  • The short description is distinct from the full description. The short description (up to 120 characters) appears on the bot's profile page and in forwarded links. The full description (up to 512 characters) appears in the empty chat screen. Manage them independently via getMyDescription / setMyDescription.
  • Returns an empty string when no locale-specific short description is set. If only a default short description exists and you request a specific language, short_description will be "". Call getMyShortDescription({}) separately to read the fallback.
  • Language codes must be ISO 639-1. Valid examples: "en", "ru", "de". An empty string "" reads the language-agnostic default.
  • Locale resolution is one level deep. There is no cascading — if a locale-specific short description is not set, you get "" rather than the default.
  • Use setMyShortDescription to update it. Read with getMyShortDescription first if you want to diff before writing.

See Also