Guides

Bot ProfileBOT-ONLY

Bot Walkthrough 1 of 18

Bots can manage the name and descriptions Telegram shows to users.

Updating Profile Information

setMyName, setMyShortDescription, and setMyDescription update the bot’s profile information.

await client.setMyName({ name: "Reminder Bot" });
await client.setMyShortDescription({
  shortDescription: "Creates reminders from chat messages.",
});
await client.setMyDescription({
  description: "Send me a message with a date and time to create a reminder.",
});

Getting Profile Information

The corresponding getter methods let you read the current values.

const name = await client.getMyName();
const shortDescription = await client.getMyShortDescription();
const description = await client.getMyDescription();

Localizing Profile Information

The languageCode option sets a value for a specific language.

await client.setMyShortDescription({
  shortDescription: "Crea recordatorios a partir de mensajes.",
  languageCode: "es",
});

The getter methods accept the same option. Omit languageCode to use the default value.