Browse Source

Rename fields for v8

Carson Hoffman 4 years ago
parent
commit
daaafb5a7f
3 changed files with 3 additions and 8 deletions
  1. 2 1
      endpoints.go
  2. 1 1
      restapi.go
  3. 0 6
      structs.go

+ 2 - 1
endpoints.go

@@ -90,7 +90,8 @@ var (
 	EndpointGuildRoles           = func(gID string) string { return EndpointGuilds + gID + "/roles" }
 	EndpointGuildRole            = func(gID, rID string) string { return EndpointGuilds + gID + "/roles/" + rID }
 	EndpointGuildInvites         = func(gID string) string { return EndpointGuilds + gID + "/invites" }
-	EndpointGuildEmbed           = func(gID string) string { return EndpointGuilds + gID + "/embed" }
+	EndpointGuildWidget          = func(gID string) string { return EndpointGuilds + gID + "/widget" }
+	EndpointGuildEmbed           = EndpointGuildWidget
 	EndpointGuildPrune           = func(gID string) string { return EndpointGuilds + gID + "/prune" }
 	EndpointGuildIcon            = func(gID, hash string) string { return EndpointCDNIcons + gID + "/" + hash + ".png" }
 	EndpointGuildIconAnimated    = func(gID, hash string) string { return EndpointCDNIcons + gID + "/" + hash + ".gif" }

+ 1 - 1
restapi.go

@@ -715,7 +715,7 @@ func (s *Session) GuildBanCreateWithReason(guildID, userID, reason string, days
 
 	queryParams := url.Values{}
 	if days > 0 {
-		queryParams.Set("delete-message-days", strconv.Itoa(days))
+		queryParams.Set("delete_message_days", strconv.Itoa(days))
 	}
 	if reason != "" {
 		queryParams.Set("reason", reason)

+ 0 - 6
structs.go

@@ -437,9 +437,6 @@ type Guild struct {
 	// The ID of the AFK voice channel.
 	AfkChannelID string `json:"afk_channel_id"`
 
-	// The ID of the embed channel ID, used for embed widgets.
-	EmbedChannelID string `json:"embed_channel_id"`
-
 	// The user ID of the owner of the guild.
 	OwnerID string `json:"owner_id"`
 
@@ -468,9 +465,6 @@ type Guild struct {
 	// The verification level required for the guild.
 	VerificationLevel VerificationLevel `json:"verification_level"`
 
-	// Whether the guild has embedding enabled.
-	EmbedEnabled bool `json:"embed_enabled"`
-
 	// Whether the guild is considered large. This is
 	// determined by a member threshold in the identify packet,
 	// and is currently hard-coded at 250 members in the library.