threadsettings.go
func (m *Messenger) SetPersistentMenu(buttons []template.Button) error {
	if len(buttons) > 5 {
		return fmt.Errorf("Too many menu buttons, number of elements in the buttons array is limited to 5.")
	}
	result, err := m.changeThreadSettings(http.MethodPost, &threadSettings{
		Type:          settingTypeCallToActions,
		State:         threadStateExisting,
		CallToActions: buttons,
	})
	if err != nil {
		return err
	}
	if result.Result != "Successfully added structured menu CTAs" {
		return fmt.Errorf("Error occured while setting persistent menu, invalid result: %s", result.Result)
	}
	return nil
}
func (m *Messenger) SetPersistentMenu(buttons []template.Button) error {
	if len(buttons) > 5 {
		return fmt.Errorf("Too many menu buttons, number of elements in the buttons array is limited to 5.")
	}
	result, err := m.changeThreadSettings(http.MethodPost, &threadSettings{
		Type:          settingTypeCallToActions,
		State:         threadStateExisting,
		CallToActions: buttons,
	})
	if err != nil {
		return err
	}
	if result.Result != "Successfully added structured menu CTAs" {
		return fmt.Errorf("Error occured while setting persistent menu, invalid result: %s", result.Result)
	}
	return nil
}
// SetPersistentMenu sets a Persistent Menu is a persistent menu that is always available to the user.
// This menu should contain top-level actions that users can enact at any point.
// Having a persistent menu easily communicates the basic capabilities of your bot for first-time and returning users.
// The menu will automatically appear in a thread if the person has been away for a certain period of time and return..
// https://developers.facebook.com/docs/messenger-platform/thread-settings/persistent-menu