account.updateBusinessWorkHours
Specify a set of Telegram Business opening hours. This info will be contained in userFull.business_work_hours. To remove all opening hours, invoke the method without setting the business_work_hours field. Note that the opening hours specified by the user must be appropriately validated and transformed before invoking the method, as specified here ».
func (c *Client) AccountUpdateBusinessWorkHours(ctx context.Context, request *AccountUpdateBusinessWorkHoursRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AccountUpdateBusinessWorkHours(ctx, &tg.AccountUpdateBusinessWorkHoursRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
BusinessWorkHours | BusinessWorkHours | — | Opening hours (optional, if not set removes all opening hours). |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | BUSINESS_WORK_HOURS_EMPTY | No work hours were specified. |
| 400 | BUSINESS_WORK_HOURS_PERIOD_INVALID | The specified work hours are invalid, see here » for the exact requirements. |
| 400 | TIMEZONE_INVALID | The specified timezone does not exist. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.updateBusinessWorkHours#4b00e066