Skip to main content

bots.setBotInfo

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

func (c *Client) BotsSetBotInfo(ctx context.Context, request *BotsSetBotInfoRequest) (bool, error)

Calling this method

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

res, err := api.BotsSetBotInfo(ctx, &tg.BotsSetBotInfoRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
BotInputUserClassIf called by a user, must contain the peer of a bot we own.
LangCodestringyesLanguage code, if left empty update the fallback about text and description
NamestringNew bot name
AboutstringNew about text
DescriptionstringNew description

Returns

bool

Possible errors

CodeTypeDescription
400BOT_INVALIDThis is not a valid bot.
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