func WithGuildIcon(icon string) GuildSetting {
	return func(s *GuildSettings) {
		s.Icon = optional.NewString(icon)
	}
}
WithGuildIcon sets the Guild icon which is a base64 encoded 128x128 jpeg image.
package discord
import (
	"strconv"
	"github.com/skwair/harmony/optional"
)
type GuildSettings struct {
	Name                        *optional.String `json:"name,omitempty"`
	Region                      *optional.String `json:"region,omitempty"`
	VerificationLevel           *optional.Int    `json:"verification_level,omitempty"`
	DefaultMessageNotifications *optional.Int    `json:"default_message_notifications,omitempty"`
	ExplicitContentFilter       *optional.Int    `json:"explicit_content_filter,omitempty"`
	AFKChannelID                *optional.String `json:"afk_channel_id,omitempty"`
	AFKTimeout                  *optional.Int    `json:"afk_timeout,omitempty"`
	Icon                        *optional.String `json:"icon,omitempty"`
	OwnerID                     *optional.String `json:"owner_id,omitempty"`
	Splash                      *optional.String `json:"splash,omitempty"`
	SystemChannelID             *optional.String `json:"system_channel_id,omitempty"`
}
type GuildSetting func(*GuildSettings)
func NewGuildSettings(opts ...GuildSetting) *GuildSettings {
	s := &GuildSettings{}
	for _, opt := range opts {
		opt(s)
	}
	return s
}
func WithGuildName(name string) GuildSetting {
	return func(s *GuildSettings) {
		s.Name = optional.NewString(name)
	}
}
func WithGuildRegion(region string) GuildSetting {
	return func(s *GuildSettings) {
		s.Region = optional.NewString(region)
	}
}
func WithGuildVerificationLevel(lvl GuildVerificationLevel) GuildSetting {
	return func(s *GuildSettings) {
		s.VerificationLevel = optional.NewInt(int(lvl))
	}
}
func WithGuildDefaultMessageNotifications(lvl GuildDefaultNotificationLevel) GuildSetting {
	return func(s *GuildSettings) {
		s.DefaultMessageNotifications = optional.NewInt(int(lvl))
	}
}
func WithGuildExplicitContentFilter(lvl GuildExplicitContentFilter) GuildSetting {
	return func(s *GuildSettings) {
		s.ExplicitContentFilter = optional.NewInt(int(lvl))
	}
}
func WithGuildAFKChannel(id string) GuildSetting {
	return func(s *GuildSettings) {
		if id == "" {
			s.AFKChannelID = optional.NewNilString()
		} else {
			s.AFKChannelID = optional.NewString(id)
		}
	}
}
func WithGuildAFKTimeout(t GuildAFKTimeout) GuildSetting {
	return func(s *GuildSettings) {
		s.AFKTimeout = optional.NewInt(int(t))
	}
}