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
| Name | Type | Required | Description |
|---|---|---|---|
Bot | InputUserClass | — | If called by a user, must contain the peer of a bot we own. |
LangCode | string | yes | Language code, if left empty update the fallback about text and description |
Name | string | — | New bot name |
About | string | — | New about text |
Description | string | — | New description |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | BOT_INVALID | This is not a valid bot. |
| 400 | USER_BOT_INVALID | User 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
- Official documentation
- Generated Go reference
- TL definition:
bots.setBotInfo#10cf3123