Skip to main content

bots.getBotInfo

Get localized name, about text and description of a bot (or of the current account, if called by a bot).

func (c *Client) BotsGetBotInfo(ctx context.Context, request *BotsGetBotInfoRequest) (*BotsBotInfo, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.BotsGetBotInfo(ctx, &tg.BotsGetBotInfoRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *BotsBotInfo
return nil
})

Parameters

NameTypeRequiredDescription
BotInputUserClassIf called by a user, must contain the peer of a bot we own.
LangCodestringyesLanguage code, if left empty this method will return the fallback about text and description.

Returns

*BotsBotInfo

Possible errors

CodeTypeDescription
400BOT_INVALIDThis is not a valid bot.
400LANG_CODE_INVALIDThe specified language code is invalid.
400USER_BOT_INVALIDUser accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts.

References