forked from pothtonswer/discordmuffin
parent
f60eda8bcb
commit
7bcc0fbaca
2 changed files with 10 additions and 10 deletions
|
@ -611,13 +611,7 @@ func (s *Session) GuildEdit(guildID string, g GuildParams) (st *Guild, err error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data := struct {
|
body, err := s.RequestWithBucketID("PATCH", EndpointGuild(guildID), g, EndpointGuild(guildID))
|
||||||
Name string `json:"name,omitempty"`
|
|
||||||
Region string `json:"region,omitempty"`
|
|
||||||
VerificationLevel *VerificationLevel `json:"verification_level,omitempty"`
|
|
||||||
}{g.Name, g.Region, g.VerificationLevel}
|
|
||||||
|
|
||||||
body, err := s.RequestWithBucketID("PATCH", EndpointGuild(guildID), data, EndpointGuild(guildID))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
12
structs.go
12
structs.go
|
@ -233,9 +233,15 @@ type UserGuild struct {
|
||||||
|
|
||||||
// A GuildParams stores all the data needed to update discord guild settings
|
// A GuildParams stores all the data needed to update discord guild settings
|
||||||
type GuildParams struct {
|
type GuildParams struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name,omitempty"`
|
||||||
Region string `json:"region"`
|
Region string `json:"region,omitempty"`
|
||||||
VerificationLevel *VerificationLevel `json:"verification_level"`
|
VerificationLevel *VerificationLevel `json:"verification_level,omitempty"`
|
||||||
|
DefaultMessageNotifications int `json:"default_message_notifications,omitempty"` // TODO: Separate type?
|
||||||
|
AfkChannelID string `json:"afk_channel_id,omitempty"`
|
||||||
|
AfkTimeout int `json:"afk_timeout,omitempty"`
|
||||||
|
Icon string `json:"icon,omitempty"`
|
||||||
|
OwnerID string `json:"owner_id,omitempty"`
|
||||||
|
Splash string `json:"splash,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// A Role stores information about Discord guild member roles.
|
// A Role stores information about Discord guild member roles.
|
||||||
|
|
Loading…
Reference in a new issue