Skip to main content

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

NameTypeRequiredDescription
BusinessWorkHoursBusinessWorkHoursOpening hours (optional, if not set removes all opening hours).

Returns

bool

Possible errors

CodeTypeDescription
400BUSINESS_WORK_HOURS_EMPTYNo work hours were specified.
400BUSINESS_WORK_HOURS_PERIOD_INVALIDThe specified work hours are invalid, see here » for the exact requirements.
400TIMEZONE_INVALIDThe specified timezone does not exist.

References