aboutsummaryrefslogtreecommitdiff
path: root/definitions/structs
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-04-11 08:15:37 -0700
committerZeyla Hellyer <[email protected]>2017-04-11 10:52:43 -0700
commitf6b27eb39c042e6779edc2d5d4b6e6c27d133eaf (patch)
treea6169fee3bf9ea75391101577dcb2982e3daa388 /definitions/structs
parentClippy lints + permission byte literals (diff)
downloadserenity-f6b27eb39c042e6779edc2d5d4b6e6c27d133eaf.tar.xz
serenity-f6b27eb39c042e6779edc2d5d4b6e6c27d133eaf.zip
Switch to using serde for deserialization
The current build system is rudimentary, incomplete, and rigid, offering little in the way of customizing decoding options. To solve this, switch to using serde-derive with custom Deserialization implementations. This allows very simple deserialization when special logic does not need to be applied, yet allows us to implement our own deserialization logic when required. The problem with the build system was that it built enums and structs from YAML files. This is not so good, because it requires creating a custom build system (which was rudimentary), creating "special struct configs" when logic needed to be ever so slightly extended (rigid), and if special logic needed to be applied, a custom deserialization method would have been needed to be made anyway (incomplete). To solve this, switch to serde-derive and implementing Deserialize ourselves where required. This reduces YAML definitions that might look like: ```yaml --- name: Group description: > A group channel, potentially including other users, separate from a [`Guild`]. [`Guild`]: struct.Guild.html fields: - name: channel_id description: The Id of the group channel. from: id type: ChannelId - name: icon description: The optional icon of the group channel. optional: true type: string - name: last_message_id description: The Id of the last message sent. optional: true type: MessageId - name: last_pin_timestamp description: Timestamp of the latest pinned message. optional: true type: string - name: name description: The name of the group channel. optional: true type: string - name: owner_id description: The Id of the group channel creator. type: UserId - name: recipients description: Group channel's members. custom: decode_users t: UserId, Arc<RwLock<User>> type: hashmap ``` to: ```rs /// A group channel - potentially including other [`User`]s - separate from a /// [`Guild`]. /// /// [`Guild`]: struct.Guild.html /// [`User`]: struct.User.html pub struct Group { /// The Id of the group channel. #[serde(rename="id")] pub channel_id: ChannelId, /// The optional icon of the group channel. pub icon: Option<String>, /// The Id of the last message sent. pub last_message_id: Option<MessageId>, /// Timestamp of the latest pinned message. pub last_pin_timestamp: Option<String>, /// The name of the group channel. pub name: Option<String>, /// The Id of the group owner. pub owner_id: UserId, /// A map of the group's recipients. #[serde(deserialize_with="deserialize_users")] pub recipients: HashMap<UserId, Arc<RwLock<User>>>, } ``` This is much simpler and does not have as much boilerplate. There should not be any backwards incompatible changes other than the old, public - yet undocumented (and hidden from documentation) - decode methods being removed. Due to the nature of this commit, field names may be incorrect, and will need to be corrected as deserialization errors are found.
Diffstat (limited to 'definitions/structs')
-rw-r--r--definitions/structs/affected_component.yml11
-rw-r--r--definitions/structs/application_info.yml65
-rw-r--r--definitions/structs/attachment.yml34
-rw-r--r--definitions/structs/ban.yml16
-rw-r--r--definitions/structs/bot_application.yml35
-rw-r--r--definitions/structs/bot_gateway.yml17
-rw-r--r--definitions/structs/call.yml35
-rw-r--r--definitions/structs/channel_override.yml19
-rw-r--r--definitions/structs/current_application_info.yml19
-rw-r--r--definitions/structs/current_user.yml25
-rw-r--r--definitions/structs/embed.yml67
-rw-r--r--definitions/structs/embed_author.yml22
-rw-r--r--definitions/structs/embed_field.yml16
-rw-r--r--definitions/structs/embed_footer.yml16
-rw-r--r--definitions/structs/embed_image.yml19
-rw-r--r--definitions/structs/embed_provider.yml11
-rw-r--r--definitions/structs/embed_thumbnail.yml17
-rw-r--r--definitions/structs/embed_video.yml16
-rw-r--r--definitions/structs/emoji.yml34
-rw-r--r--definitions/structs/emoji_identifier.yml12
-rw-r--r--definitions/structs/game.yml19
-rw-r--r--definitions/structs/gateway.yml13
-rw-r--r--definitions/structs/group.yml35
-rw-r--r--definitions/structs/guild.yml108
-rw-r--r--definitions/structs/guild_channel.yml51
-rw-r--r--definitions/structs/guild_embed.yml13
-rw-r--r--definitions/structs/guild_info.yml20
-rw-r--r--definitions/structs/guild_prune.yml8
-rw-r--r--definitions/structs/incident.yml33
-rw-r--r--definitions/structs/incident_update.yml26
-rw-r--r--definitions/structs/integration.yml26
-rw-r--r--definitions/structs/integration_account.yml8
-rw-r--r--definitions/structs/invite.yml23
-rw-r--r--definitions/structs/invite_channel.yml11
-rw-r--r--definitions/structs/invite_guild.yml14
-rw-r--r--definitions/structs/maintenance.yml16
-rw-r--r--definitions/structs/member.yml28
-rw-r--r--definitions/structs/message.yml76
-rw-r--r--definitions/structs/message_reaction.yml24
-rw-r--r--definitions/structs/partial_guild.yml48
-rw-r--r--definitions/structs/permission_overwrite.yml11
-rw-r--r--definitions/structs/presence.yml27
-rw-r--r--definitions/structs/private_channel.yml26
-rw-r--r--definitions/structs/reaction.yml30
-rw-r--r--definitions/structs/ready.yml35
-rw-r--r--definitions/structs/rich_invite.yml59
-rw-r--r--definitions/structs/role.yml51
-rw-r--r--definitions/structs/user.yml28
-rw-r--r--definitions/structs/voice_region.yml31
-rw-r--r--definitions/structs/voice_state.yml24
-rw-r--r--definitions/structs/webhook.yml47
51 files changed, 0 insertions, 1475 deletions
diff --git a/definitions/structs/affected_component.yml b/definitions/structs/affected_component.yml
deleted file mode 100644
index d5b8be3..0000000
--- a/definitions/structs/affected_component.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-name: AffectedComponent
-description: >
- A component that was affected during a service incident.
-
-
- This is pulled from the Discord status page.
-fields:
- - name: name
- description: The name of the affected component.
- type: string
diff --git a/definitions/structs/application_info.yml b/definitions/structs/application_info.yml
deleted file mode 100644
index c7bfb98..0000000
--- a/definitions/structs/application_info.yml
+++ /dev/null
@@ -1,65 +0,0 @@
----
-name: ApplicationInfo
-description: >
- Information about a user's application. An application does not necessarily
- have an associated bot user.
-fields:
- - name: bot
- description: >
- The bot user associated with this application. See [BotApplication] for
- more information.
-
- [BotApplication]: struct.BotApplication.html
- optional: true
- type: BotApplication
- - name: bot_public
- default: true
- description: >
- Whether or not the bot is public. If a bot is public, anyone may invite it
- to their [Guild]. While a bot is private, only the owner may add it to a
- guild.
-
- [Guild]: struct.Guild.html
- type: bool
- - name: bot_require_code_grant
- description: Whether or not the bot requires an OAuth2 code grant.
- type: bool
- - name: description
- description: >
- A description of the application, assigned by the application owner.
- type: string
- - name: flags
- description: >
- A set of bitflags assigned to the application, which represent gated
- feature flags that have been enabled for the application's bot user.
-
- If the application does not have a bot user, then bitflags are not
- present.
- optional: true
- type: u64
- - name: icon
- description: >
- A hash pointing to the application's icon. This is not necessarily
- equivalent to the bot user's avatar. If there is no icon assigned, then
- this is None.
- optional: true
- type: string
- - name: id
- description: The numeric id of the application.
- type: UserId
- - name: name
- description: The name assigned to the application by the application owner.
- type: string
- - name: redirect_uris
- array: true
- description: A list of redirect URIs assigned to the application.
- type: string
- - name: rpc_origins
- array: true
- description: A list of RPC Origins asigned to the application.
- type: string
- - name: secret
- description: >
- The given secret to the application. Note that this is not equivalent to
- an application's bot user's token.
- type: string
diff --git a/definitions/structs/attachment.yml b/definitions/structs/attachment.yml
deleted file mode 100644
index 5d659f8..0000000
--- a/definitions/structs/attachment.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: Attachment
-description: >
- A file uploaded with a message. Not to be confused with [`Embed`]s.
-
- [`Embed`]: struct.Embed.html
-fields:
- - name: id
- description: The unique ID given to this attachment.
- type: string
- - name: filename
- description: >
- The filename of the file that was uploaded. This is equivalent to what the
- uploader had their file named.
- type: string
- - name: height
- description: >
- If the attachment is an image, then the height of the image is provided.
- optional: true
- type: u64
- - name: proxy_url
- description: The proxy URL.
- type: string
- - name: size
- description: The size of the file in bytes.
- type: u64
- - name: url
- description: The URL of the uploaded attachment.
- type: string
- - name: width
- description: >
- If the attachment is an image, then the width of the image is provided.
- optional: true
- type: u64
diff --git a/definitions/structs/ban.yml b/definitions/structs/ban.yml
deleted file mode 100644
index ebfd256..0000000
--- a/definitions/structs/ban.yml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-name: Ban
-description: A representation of a banning of a user.
-fields:
- - name: reason
- description: >
- The reason given for this ban.
-
-
- **Note**: Until the Audit Log feature is completed by Discord, then this
- will always be None.
- optional: true
- type: string
- - name: user
- description: The user that was banned.
- type: User
diff --git a/definitions/structs/bot_application.yml b/definitions/structs/bot_application.yml
deleted file mode 100644
index 8825230..0000000
--- a/definitions/structs/bot_application.yml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-name: BotApplication
-description: Information about an application with an application's bot user.
-fields:
- - name: id
- description: The Id of the bot user.
- type: UserId
- - name: avatar
- description: >
- A hash of the avatar, if one is assigned. This can be used to generate a
- full URL.
- optional: true
- type: string
- - name: bot
- default: 'false'
- description: Whether or not this is a bot.
- type: bool
- - name: discriminator
- custom: decode_discriminator
- description: >
- The discriminator assigned to the user's username. While discriminators
- are not unique, the username#discriminator combination is.
- type: u16
- - name: name
- description: The username.
- from: username
- type: string
- - name: token
- description: >
- The token used to login to the bot user.
-
-
- **Note**: Keep this information private, as untrusted users can use it to
- perform any action on a bot.
- type: string
diff --git a/definitions/structs/bot_gateway.yml b/definitions/structs/bot_gateway.yml
deleted file mode 100644
index 418f79e..0000000
--- a/definitions/structs/bot_gateway.yml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-name: BotGateway
-description: >
- A representation of the data retrieved from the bot gateway endpoint.
-
-
- This is different from the [`Gateway`], as this includes the number of shards
- that is recommended for use by the bot and can only be used by bots.
-
- [`Gateway`]: struct.Gateway.html
-fields:
- - name: shards
- description: The number of shards that is recommended to be used by the bot.
- type: u64
- - name: url
- description: The gateway to connect to.
- type: string
diff --git a/definitions/structs/call.yml b/definitions/structs/call.yml
deleted file mode 100644
index b6d66a9..0000000
--- a/definitions/structs/call.yml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-name: Call
-description: >
- An active group or private call. These are different from
- [voice channel][`ChannelType::Voice`]s in guilds.
-
- [`ChannelType::Voice`]: enum.ChannelType.html#Voice.v
-fields:
- - name: channel_id
- description: The group or private channel that the call is associated with.
- type: ChannelId
- - name: message_id
- description: >
- The Id of the [message][`Message`] denoting that the call is active.
-
- [`Message`]: struct.Message.html
- type: MessageId
- - name: region
- description: >
- The [region][`Region`] that the call is taking place in.
-
- [`Region`]: enum.Region.html
- type: string
- - name: ringing
- description: A list of users that are currently being ringed.
- array: true
- type: UserId
- - name: unavailable
- description: Whether the server hosting the call is unavailable.
- type: bool
- - name: voice_states
- custom: decode_voice_states
- description: The users present in the call.
- t: UserId, VoiceState
- type: hashmap
diff --git a/definitions/structs/channel_override.yml b/definitions/structs/channel_override.yml
deleted file mode 100644
index b6b22ac..0000000
--- a/definitions/structs/channel_override.yml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-name: ChannelOverride
-description: >
- An override for a [channel][`Channel`].
-
- [`Channel`]: enum.Channel.html
-fields:
- - name: channel_id
- description: The channel this override is for.
- type: ChannelId
- - name: message_notifications
- description: The notification level to use for the channel.
- type: NotificationLevel
- - name: muted
- description: >
- Whether or not the channel is muted; while this will not show a
- notification indicator for the channel, it will continue to show when the
- user is mentioned in it.
- type: bool
diff --git a/definitions/structs/current_application_info.yml b/definitions/structs/current_application_info.yml
deleted file mode 100644
index cbf338d..0000000
--- a/definitions/structs/current_application_info.yml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-name: CurrentApplicationInfo
-description: Information about the current application and its owner.
-fields:
- - name: description
- type: string
- - name: icon
- optional: true
- type: string
- - name: id
- type: UserId
- - name: name
- type: string
- - name: owner
- type: User
- - name: rpc_origins
- array: true
- default: Vec::default()
- type: string
diff --git a/definitions/structs/current_user.yml b/definitions/structs/current_user.yml
deleted file mode 100644
index 336adc0..0000000
--- a/definitions/structs/current_user.yml
+++ /dev/null
@@ -1,25 +0,0 @@
----
-name: CurrentUser
-description: Information about the current user.
-fields:
- - name: id
- type: UserId
- - name: avatar
- optional: true
- type: string
- - name: bot
- default: 'false'
- type: bool
- - name: discriminator
- custom: decode_discriminator
- type: u16
- - name: email
- optional: true
- type: string
- - name: mfa_enabled
- type: bool
- - name: name
- from: username
- type: string
- - name: verified
- type: bool
diff --git a/definitions/structs/embed.yml b/definitions/structs/embed.yml
deleted file mode 100644
index 3ab4581..0000000
--- a/definitions/structs/embed.yml
+++ /dev/null
@@ -1,67 +0,0 @@
----
-name: Embed
-description: >
- Represents a rich embed which allows using richer markdown, multiple fields
- and more. This was heavily inspired by [slack's attachments].
-
-
- You can include an attachment in your own message by a user or a bot,
- or in a webhook.
-
-
- **Note**: Maximum amount of characters you can put is 256 in a field name,
- 1024 in a field value, and 2048 in a description.
-
- [slack's attachments]: https://api.slack.com/docs/message-attachments
-fields:
- - name: author
- description: Author information about the embed.
- optional: true
- type: EmbedAuthor
- - name: colour
- description: The colour code of the embed.
- from: color
- default: Colour::default()
- type: Colour
- - name: description
- description: The description of the embed. This is the long string of text.
- optional: true
- type: string
- - name: fields
- array: true
- description: The array of fields of the embed.
- optional: true
- type: EmbedField
- - name: image
- description: The image information of the embed.
- optional: true
- type: EmbedImage
- - name: kind
- description: >
- The type of the embed. For webhook embeds, this is always `rich`.
- from: type
- type: string
- - name: provider
- description: The provider information for the embed.
- optional: true
- type: EmbedProvider
- - name: thumbnail
- description: The thumbnail provided for the embed.
- optional: true
- type: EmbedThumbnail
- - name: timestamp
- description: Timestamp of embed content.
- optional: true
- type: string
- - name: title
- description: The title of the embed.
- optional: true
- type: string
- - name: url
- description: The URL of the embed.
- optional: true
- type: string
- - name: video
- description: The embed's video information.
- optional: true
- type: EmbedVideo
diff --git a/definitions/structs/embed_author.yml b/definitions/structs/embed_author.yml
deleted file mode 100644
index 7525c66..0000000
--- a/definitions/structs/embed_author.yml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-name: EmbedAuthor
-description: >
- An author object in an [`Embed`].
-
- [`Embed`]: struct.Embed.html
-fields:
- - name: icon_url
- description: The URL of the author icon. Note this only supports HTTP(s).
- optional: true
- type: string
- - name: name
- description: The name of the author.
- type: string
- - name: proxy_icon_url
- description: A proxied URL of the author icon.
- optional: true
- type: string
- - name: url
- description: The URL of the author.
- optional: true
- type: string
diff --git a/definitions/structs/embed_field.yml b/definitions/structs/embed_field.yml
deleted file mode 100644
index 19d1b17..0000000
--- a/definitions/structs/embed_field.yml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-name: EmbedField
-description: >
- A field object in an [`Embed`].
-
- [`Embed`]: struct.Embed.html
-fields:
- - name: inline
- description: Whether or not the field should display as inline.
- type: bool
- - name: name
- description: The name of the field.
- type: string
- - name: value
- description: The value of the field.
- type: string
diff --git a/definitions/structs/embed_footer.yml b/definitions/structs/embed_footer.yml
deleted file mode 100644
index 2901094..0000000
--- a/definitions/structs/embed_footer.yml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-name: EmbedFooter
-description: >
- Footer information about an [`Embed`].
-
- [`Embed`]: struct.Embed.html
-fields:
- - name: icon_url
- description: The URL of the footer icon. Note this only supports HTTP(s).
- type: string
- - name: proxy_icon_url
- description: A proxied URL of the footer icon.
- type: string
- - name: text
- description: The associated text with the footer.
- type: string
diff --git a/definitions/structs/embed_image.yml b/definitions/structs/embed_image.yml
deleted file mode 100644
index 4bb77a0..0000000
--- a/definitions/structs/embed_image.yml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-name: EmbedImage
-description: >
- An image object in an [`Embed`].
-
- [`Embed`]: struct.Embed.html
-fields:
- - name: height
- description: The height of the image.
- type: u64
- - name: proxy_url
- description: A proxied URL of the image.
- type: string
- - name: url
- description: Source URL of the image. Note this only supports HTTP(s).
- type: string
- - name: width
- description: The width of the image.
- type: u64
diff --git a/definitions/structs/embed_provider.yml b/definitions/structs/embed_provider.yml
deleted file mode 100644
index 0266265..0000000
--- a/definitions/structs/embed_provider.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-name: EmbedProvider
-description: The provider of an embed.
-fields:
- - name: name
- description: The name of the provider.
- type: string
- - name: url
- description: The URL of the provider.
- optional: true
- type: string
diff --git a/definitions/structs/embed_thumbnail.yml b/definitions/structs/embed_thumbnail.yml
deleted file mode 100644
index 2c0ddff..0000000
--- a/definitions/structs/embed_thumbnail.yml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-name: EmbedThumbnail
-description: The dimensions and URL of an embed thumbnail.
-fields:
- - name: height
- description: The height of the thumbnail in pixels.
- type: u64
- - name: proxy_url
- description: A proxied URL of the thumbnail.
- type: string
- - name: url
- description: >
- The source URL of the thumbnail. Note this only supports HTTP(s).
- type: string
- - name: width
- description: The width of the thumbnail in pixels.
- type: u64
diff --git a/definitions/structs/embed_video.yml b/definitions/structs/embed_video.yml
deleted file mode 100644
index 6db8893..0000000
--- a/definitions/structs/embed_video.yml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-name: EmbedVideo
-description: >
- A video information object in an [`Embed`].
-
- [`Embed`]: struct.Embed.html
-fields:
- - name: height
- description: The height of the video.
- type: u64
- - name: url
- description: The source URL of the video.
- type: string
- - name: width
- description: The width of the video.
- type: u64
diff --git a/definitions/structs/emoji.yml b/definitions/structs/emoji.yml
deleted file mode 100644
index bec6e4b..0000000
--- a/definitions/structs/emoji.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: Emoji
-description: >
- Represents a custom guild emoji, which can either be created using the API,
- or via an integration. Emojis created using the API only work within the guild
- it was created in.
-fields:
- - name: id
- description: The Id of the emoji.
- type: EmojiId
- - name: name
- description: >
- The name of the emoji. It must be at least 2 characters long and can only
- contain alphanumeric characters and underscores.
- type: string
- - name: managed
- description: >
- Whether the emoji is managed via an [`Integration`] service.
-
- [`Integration`]: struct.Integration.html
- type: bool
- - name: require_colons
- description: >
- Whether the emoji name needs to be surrounded by colons in order to be
- used by the client.
- type: bool
- - name: roles
- array: true
- description: >
- A list of [`Role`]s that are allowed to use the emoji. If there are no
- roles specified, then usage is unrestricted.
-
- [`Role`]: struct.Role.html
- type: RoleId
diff --git a/definitions/structs/emoji_identifier.yml b/definitions/structs/emoji_identifier.yml
deleted file mode 100644
index dab116f..0000000
--- a/definitions/structs/emoji_identifier.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-name: EmojiIdentifier
-description: Version of emoji struct used only when Id and name are known.
-fields:
- - name: id
- description: The Id of the emoji.
- type: EmojiId
- - name: name
- description: >
- The name of the emoji. It must be at least 2 characters long and can only
- contain alphanumeric characters and underscores.
- type: string
diff --git a/definitions/structs/game.yml b/definitions/structs/game.yml
deleted file mode 100644
index afd02ff..0000000
--- a/definitions/structs/game.yml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-name: Game
-description: >
- Represents a game that a a user is playing, or streaming in the case that a
- stream link is provided.
-fields:
- - name: kind
- description: The type of game status.
- default: GameType::Playing
- from: type
- type: GameType
- - name: name
- description: The name of the game that's being played.
- type: string
- - name: url
- description: Stream URL if the `kind` is `Streaming`.
- optional: true
- type: string
-decode: false
diff --git a/definitions/structs/gateway.yml b/definitions/structs/gateway.yml
deleted file mode 100644
index c13ca9d..0000000
--- a/definitions/structs/gateway.yml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-name: Gateway
-description: >
- A representation of the data retrieved from the gateway endpoint.
-
-
- For the bot-specific gateway, refer to [`BotGateway`].
-
- [`BotGateway`]: struct.BotGateway.html
-fields:
- - name: url
- description: The gateway to connect to.
- type: string
diff --git a/definitions/structs/group.yml b/definitions/structs/group.yml
deleted file mode 100644
index a4ebd19..0000000
--- a/definitions/structs/group.yml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-name: Group
-description: >
- A group channel, potentially including other users, separate from a [`Guild`].
-
- [`Guild`]: struct.Guild.html
-fields:
- - name: channel_id
- description: The Id of the group channel.
- from: id
- type: ChannelId
- - name: icon
- description: The optional icon of the group channel.
- optional: true
- type: string
- - name: last_message_id
- description: The Id of the last message sent.
- optional: true
- type: MessageId
- - name: last_pin_timestamp
- description: Timestamp of the latest pinned message.
- optional: true
- type: string
- - name: name
- description: The name of the group channel.
- optional: true
- type: string
- - name: owner_id
- description: The Id of the group channel creator.
- type: UserId
- - name: recipients
- description: Group channel's members.
- custom: decode_users
- t: UserId, Arc<RwLock<User>>
- type: hashmap
diff --git a/definitions/structs/guild.yml b/definitions/structs/guild.yml
deleted file mode 100644
index 9894f7b..0000000
--- a/definitions/structs/guild.yml
+++ /dev/null
@@ -1,108 +0,0 @@
----
-name: Guild
-description: Information about a Discord guild such as channels, emojis, etc.
-fields:
- - name: afk_channel_id
- description: Id of a voice channel that's considered AFK.
- optional: true
- type: ChannelId
- - name: afk_timeout
- description: >
- The amount of seconds a user can not show any activity in a voice
- channel before being moved to an AFK channel if one exists.
- type: u64
- - name: channels
- description: >
- All voice and text channels a guild has. This gives all of them
- regardless of permissions.
- t: ChannelId, Arc<RwLock<GuildChannel>>
- type: hashmap
- - name: default_message_notifications
- description: >
- Lets you know if notifications for all messages are enabled by
- default in the guild.
- type: u64
- - name: emojis
- description: >
- All custom emojis of a guild. Such are made using the API or
- Twitch integrations.
- custom: decode_emojis
- t: EmojiId, Emoji
- type: hashmap
- - name: features
- description: >
- VIP guild features a guild has. Can be obtained through
- [Discord Partnership] website.
-
- [Discord Partnership]: https://discordapp.com/partners
- array: true
- type: Feature
- - name: icon
- description: Optional guild icon that appears in sidebar.
- optional: true
- type: string
- - name: id
- description: >
- Guild's Id which is also the Id of the default role and channel.
- type: GuildId
- - name: joined_at
- type: string
- - name: large
- description: >
- Set to true if guild has a lot of users.
-
-
- True indicates that offline guild members aren't initially sent.
- type: bool
- - name: member_count
- description: >
- The amount of members in guild.
- type: u64
- - name: members
- description: >
- Members of the guild. Members might not all be available on start-up if
- the `large` field is `true`.
- custom: decode_members
- t: UserId, Member
- type: hashmap
- - name: mfa_level
- description: >
- Indicator if guild requires 2-factor authentication for roles with certain
- permissions.
- type: u64
- - name: name
- description: The guild's name.
- type: string
- - name: owner_id
- description: Id of the guild's owner.
- type: UserId
- - name: presences
- description: Presence statuses of members.
- custom: decode_emojis
- t: UserId, Presence
- type: hashmap
- - name: region
- description: The region that the guild's voice servers are located in.
- type: string
- - name: roles
- description: All roles a guild has.
- custom: decode_roles
- t: RoleId, Role
- type: hashmap
- - name: splash
- description: >
- If [InviteSplash] feature is enabled, this can point to splash image
- URL displayed when someone opens invite URL.
-
- [InviteSplash]: enum.Feature.html#variant.InviteSplash
- optional: true
- type: string
- - name: verification_level
- description: Determines the verification level.
- type: VerificationLevel
- - name: voice_states
- description: Lets you know what voice channels user have joined.
- custom: decode_voice_states
- t: UserId, VoiceState
- type: hashmap
-decode: false
diff --git a/definitions/structs/guild_channel.yml b/definitions/structs/guild_channel.yml
deleted file mode 100644
index d3c8b73..0000000
--- a/definitions/structs/guild_channel.yml
+++ /dev/null
@@ -1,51 +0,0 @@
----
-name: GuildChannel
-description: >
- Represents a guild's voice or text channel. Some methods are available
- only for voice channels and some are only available for text channels.
-fields:
- - name: id
- description: >
- Channel's Id. Default channel shares the Id with the guild it is in.
- type: ChannelId
- - name: bitrate
- description: Bitrate of channel. Only available for voice channels.
- optional: true
- type: u64
- - name: guild_id
- description: Id of the guild the channel is located in.
- type: GuildId
- - name: kind
- description: Type of the channel.
- type: ChannelType
- - name: last_message_id
- description: >
- The Id of last message sent. It lets client determine
- if channel has unread messages.
- optional: true
- type: MessageId
- - name: last_pin_timestamp
- description: Timestamp of the latest pinned message.
- optional: true
- type: string
- - name: name
- description: >
- Channel name. Voice and text channels have different
- limitations for this.
- type: string
- - name: permission_overwrites
- description: Permission overwrites for members and roles.
- array: true
- type: PermissionOverwrite
- - name: position
- description: Position of a channel.
- type: i64
- - name: topic
- description: Text channel topic.
- optional: true
- type: string
- - name: user_limit
- description: Max amount of members allowed in a voice channel.
- optional: true
- type: u64
-decode: false
diff --git a/definitions/structs/guild_embed.yml b/definitions/structs/guild_embed.yml
deleted file mode 100644
index 8e43fac..0000000
--- a/definitions/structs/guild_embed.yml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-name: GuildEmbed
-description: Information relating to a guild's embed.
-fields:
- - name: channel_id
- description: >
- The ID of the [`Channel`] to show the embed for.
-
- [`Channel`]: enum.Channel.html
- type: ChannelId
- - name: enabled
- description: Whether the embed is enabled.
- type: bool
diff --git a/definitions/structs/guild_info.yml b/definitions/structs/guild_info.yml
deleted file mode 100644
index 349f5bf..0000000
--- a/definitions/structs/guild_info.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: GuildInfo
-description: Basic information about a guild used for oauth.
-fields:
- - name: id
- description: Id of the Guild. Can be used to calculate the creation date.
- type: GuildId
- - name: icon
- description: The guild's icon.
- optional: true
- type: string
- - name: name
- description: The guild's name.
- type: string
- - name: owner
- description: True if you're the owner of the guild.
- type: bool
- - name: permissions
- description: Permissions that you have in the guild.
- type: Permissions
diff --git a/definitions/structs/guild_prune.yml b/definitions/structs/guild_prune.yml
deleted file mode 100644
index 29990ef..0000000
--- a/definitions/structs/guild_prune.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: GuildPrune
-description: >
- Representation of the number of members that would be pruned by a guild prune
- operation.
-fields:
- - name: pruned
- type: u64
diff --git a/definitions/structs/incident.yml b/definitions/structs/incident.yml
deleted file mode 100644
index 03513d1..0000000
--- a/definitions/structs/incident.yml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-name: Incident
-description: >
- An incident retrieved from the Discord status page.
-
-
- This is not necessarily a representation of an ongoing incident.
-fields:
- - name: created_at
- type: string
- - name: id
- type: string
- - name: impact
- type: string
- - name: incident_updates
- array: true
- type: IncidentUpdate
- - name: monitoring_at
- optional: true
- type: string
- - name: name
- type: string
- - name: page_id
- type: string
- - name: resolved_at
- optional: true
- type: string
- - name: short_link
- type: string
- - name: status
- type: string
- - name: updated_at
- type: string
diff --git a/definitions/structs/incident_update.yml b/definitions/structs/incident_update.yml
deleted file mode 100644
index dc97bc3..0000000
--- a/definitions/structs/incident_update.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-name: IncidentUpdate
-description: >
- An update to an incident from the Discord status page.
-
-
- This will typically state what new information has been discovered about an
- incident.
-fields:
- - name: affected_components
- array: true
- type: AffectedComponent
- - name: body
- type: string
- - name: created_at
- type: string
- - name: display_at
- type: string
- - name: id
- type: string
- - name: incident_id
- type: string
- - name: status
- type: IncidentStatus
- - name: updated_at
- type: string
diff --git a/definitions/structs/integration.yml b/definitions/structs/integration.yml
deleted file mode 100644
index f6dfa20..0000000
--- a/definitions/structs/integration.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-name: Integration
-description: Holds various information about integrations.
-fields:
- - name: id
- type: IntegrationId
- - name: account
- type: IntegrationAccount
- - name: enabled
- type: bool
- - name: expire_behavior
- type: u64
- - name: expire_grace_period
- type: u64
- - name: kind
- type: string
- - name: name
- type: string
- - name: role_id
- type: RoleId
- - name: synced_at
- type: u64
- - name: syncing
- type: bool
- - name: user
- type: User
diff --git a/definitions/structs/integration_account.yml b/definitions/structs/integration_account.yml
deleted file mode 100644
index 67776e4..0000000
--- a/definitions/structs/integration_account.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: IntegrationAccount
-description: Integration Account Object
-fields:
- - name: id
- type: string
- - name: name
- type: string
diff --git a/definitions/structs/invite.yml b/definitions/structs/invite.yml
deleted file mode 100644
index 45beac3..0000000
--- a/definitions/structs/invite.yml
+++ /dev/null
@@ -1,23 +0,0 @@
----
-name: Invite
-description: >
- Information about an invite URL. Can't be accessed if the current user is
- banned.
-fields:
- - name: code
- description: The unique code for the invite.
- type: string
- - name: channel
- description: >
- A representation of the minimal amount of information needed about the
- [`GuildChannel`] being invited to.
-
- [`GuildChannel`]: struct.GuildChannel.html
- type: InviteChannel
- - name: guild
- description: >
- A representation of the minimal amount of information needed about the
- [`Guild`] being invited to.
-
- [`Guild`]: struct.Guild.html
- type: InviteGuild
diff --git a/definitions/structs/invite_channel.yml b/definitions/structs/invite_channel.yml
deleted file mode 100644
index 45730a6..0000000
--- a/definitions/structs/invite_channel.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-name: InviteChannel
-description: Minimal information about the channel an invite points to.
-fields:
- - name: id
- type: ChannelId
- - name: name
- type: string
- - name: kind
- from: type
- type: ChannelType
diff --git a/definitions/structs/invite_guild.yml b/definitions/structs/invite_guild.yml
deleted file mode 100644
index 79ec067..0000000
--- a/definitions/structs/invite_guild.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-name: InviteGuild
-description: A minimal amount of information about an invite's guild.
-fields:
- - name: id
- type: GuildId
- - name: icon
- optional: true
- type: string
- - name: name
- type: string
- - name: splash_hash
- optional: true
- type: string
diff --git a/definitions/structs/maintenance.yml b/definitions/structs/maintenance.yml
deleted file mode 100644
index 9a34dbb..0000000
--- a/definitions/structs/maintenance.yml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-name: Maintenance
-description: >
- A Discord status maintenance message. This can be either for active
- maintenances or for scheduled maintenances.
-fields:
- - name: description
- type: string
- - name: id
- type: string
- - name: name
- type: string
- - name: start
- type: string
- - name: stop
- type: string
diff --git a/definitions/structs/member.yml b/definitions/structs/member.yml
deleted file mode 100644
index 585d780..0000000
--- a/definitions/structs/member.yml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-name: Member
-description: Represents information about a member of a guild.
-fields:
- - name: deaf
- description: True if user isn't allowed to hear in voice channels.
- type: bool
- - name: guild_id
- description: The Id of the guild that the member is a part of.
- optional: true
- type: GuildId
- - name: joined_at
- description: Timestamp representing the date when the member joined.
- type: string
- - name: mute
- description: True if user isn't allowed to talk in voice channels.
- type: bool
- - name: nick
- description: Optional nickname. Can't be longer than 32 characters.
- optional: true
- type: string
- - name: roles
- description: Ids of roles that were given to the member.
- array: true
- type: RoleId
- - name: user
- description: Attached User struct.
- type: Arc<RwLock<User>>
diff --git a/definitions/structs/message.yml b/definitions/structs/message.yml
deleted file mode 100644
index 760f03a..0000000
--- a/definitions/structs/message.yml
+++ /dev/null
@@ -1,76 +0,0 @@
----
-name: Message
-description: >
- A representation of a message sent over a guild's text channel, a group, or a
- private channel.
-fields:
- - name: id
- description: Message Id. Can be used to calculate the message creation date.
- type: MessageId
- - name: attachments
- description: Array of attached files a message has.
- array: true
- type: Attachment
- - name: author
- description: User that sent the message.
- type: User
- - name: channel_id
- description: Channel to which the message was sent.
- type: ChannelId
- - name: content
- description: Message's content.
- type: string
- - name: edited_timestamp
- description: >
- If the message was edited, this will show the last edit timestamp.
- optional: true
- type: string
- - name: embeds
- description: Array of embeds a message has.
- array: true
- type: Embed
- - name: hit
- default: "false"
- description: >
- Whether the message is the "found" message in a search. Note that this is
- only relevant in the context of searches, and will otherwise always be
- `false`.
- type: bool
- - name: kind
- description: Lets you differentiate system messages and regular messages.
- from: type
- type: MessageType
- - name: mention_everyone
- description: >
- Shows you whether this message actually mentions everyone or not.
- type: bool
- - name: mention_roles
- description: Array of roles mentioned by the message.
- array: true
- type: RoleId
- - name: mentions
- description: Array of users mentioned by the messages.
- array: true
- type: User
- - name: nonce
- description: Non-repeating number used for ensuring message order.
- optional: true
- type: string
- - name: pinned
- description: True if message is pinned.
- type: bool
- - name: reactions
- description: Array of reactions performed on the message.
- array: true
- default: Vec::default()
- type: MessageReaction
- - name: timestamp
- description: Initial message creation timestamp calculated from Id.
- type: string
- - name: tts
- description: True if message was sent with /tts command.
- type: bool
- - name: webhook_id
- description: An id of a webhook if message was sent using one.
- optional: true
- type: WebhookId
diff --git a/definitions/structs/message_reaction.yml b/definitions/structs/message_reaction.yml
deleted file mode 100644
index 4f26e27..0000000
--- a/definitions/structs/message_reaction.yml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-name: MessageReaction
-description: >
- A representation of a [`Reaction`] to a [`Message`], where multiple of the
- same [reaction type] are stacked into one `MessageReaction`, with an
- associated [`count`].
-
-
- [`Message`]: struct.Message.html
- [`Reaction`]: struct.Reaction.html
- [`count`]: #structfield.count
- [reaction type]: enum.ReactionType.html
-fields:
- - name: count
- description: The amount of the type of reaction that have been sent for
- the associated message.
- type: u64
- - name: me
- description: Whether the current user has sent the type of reaction.
- type: bool
- - name: reaction_type
- description: The type of reaction.
- from: emoji
- type: ReactionType
diff --git a/definitions/structs/partial_guild.yml b/definitions/structs/partial_guild.yml
deleted file mode 100644
index 65c2462..0000000
--- a/definitions/structs/partial_guild.yml
+++ /dev/null
@@ -1,48 +0,0 @@
----
-name: PartialGuild
-description: >
- Partial information about a guild. This does not include information like
- member data.
-fields:
- - name: id
- type: GuildId
- - name: afk_channel_id
- optional: true
- type: ChannelId
- - name: afk_timeout
- type: u64
- - name: default_message_notifications
- type: u64
- - name: embed_channel_id
- optional: true
- type: ChannelId
- - name: embed_enabled
- type: bool
- - name: emojis
- custom: decode_emojis
- t: EmojiId, Emoji
- type: hashmap
- - name: features
- array: true
- custom: Feature::decode_str
- type: Feature
- - name: icon
- optional: true
- type: string
- - name: mfa_level
- type: u64
- - name: name
- type: string
- - name: owner_id
- type: UserId
- - name: region
- type: string
- - name: roles
- custom: decode_roles
- t: RoleId, Role
- type: hashmap
- - name: splash
- optional: true
- type: string
- - name: verification_level
- type: VerificationLevel
diff --git a/definitions/structs/permission_overwrite.yml b/definitions/structs/permission_overwrite.yml
deleted file mode 100644
index 4f81840..0000000
--- a/definitions/structs/permission_overwrite.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-name: PermissionOverwrite
-description: A channel-specific permission overwrite for a member or role.
-fields:
- - name: allow
- type: Permissions
- - name: deny
- type: Permissions
- - name: kind
- type: PermissionOverwriteType
-decode: false
diff --git a/definitions/structs/presence.yml b/definitions/structs/presence.yml
deleted file mode 100644
index 7889bc1..0000000
--- a/definitions/structs/presence.yml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-name: Presence
-description: A set of settings each member of a guild has.
-fields:
- - name: game
- description: A game's name that is displayed near user's name.
- optional: true
- type: Game
- - name: last_modified
- description: Date of last presence change.
- optional: true
- type: u64
- - name: nick
- description: Optional nickname. Can't be longer than 32 characters.
- optional: true
- type: string
- - name: status
- description: Member's online status.
- type: OnlineStatus
- - name: user_id
- description: Member's Id. Can be used to calculate account creation date.
- type: UserId
- - name: user
- description: Attached User struct.
- optional: true
- type: Arc<RwLock<User>>
-decode: false
diff --git a/definitions/structs/private_channel.yml b/definitions/structs/private_channel.yml
deleted file mode 100644
index 8b8abf2..0000000
--- a/definitions/structs/private_channel.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-name: PrivateChannel
-description: A Direct Message text channel with another user.
-fields:
- - name: id
- description: >
- Private channel's Id. Can be used to calculate the first message's
- creation date.
- type: ChannelId
- - name: last_message_id
- description: >
- The Id of last message sent. It lets client determine if the channel has
- unread messages.
- optional: true
- type: MessageId
- - name: last_pin_timestamp
- description: Timestamp of the latest pinned message.
- optional: true
- type: string
- - name: kind
- description: Lets you differentiate between channel types.
- type: ChannelType
- - name: recipient
- description: User that receives messages in this channel.
- type: Arc<RwLock<User>>
-decode: false
diff --git a/definitions/structs/reaction.yml b/definitions/structs/reaction.yml
deleted file mode 100644
index d04388e..0000000
--- a/definitions/structs/reaction.yml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-name: Reaction
-description: >
- An [`Emoji`] reaction to a [`Message`].
-
- [`Emoji`]: struct.Emoji.html
- [`Message`]: struct.Message.html
-fields:
- - name: channel_id
- description: >
- The [`Channel`] of the associated [`Message`].
-
- [`Channel`]: enum.Channel.html
- [`Message`]: struct.Message.html
- type: ChannelId
- - name: emoji
- description: The reactive emoji used.
- type: ReactionType
- - name: message_id
- description: >
- The [`Message`] that was reacted to.
-
- [`Message`]: struct.Message.html
- type: MessageId
- - name: user_id
- description: >
- The Id of the [`User`] that sent the reaction.
-
- [`User`]: struct.User.html
- type: UserId
diff --git a/definitions/structs/ready.yml b/definitions/structs/ready.yml
deleted file mode 100644
index 5f5f1eb..0000000
--- a/definitions/structs/ready.yml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-name: Ready
-description: >
- An active group or private call. These are different from guild voice
- channels.
-fields:
- - name: guilds
- array: true
- custom: PossibleGuild::<Guild>::decode
- type: PossibleGuild<Guild>
- - name: presences
- custom: decode_presences
- t: UserId, Presence
- type: hashmap
- - name: private_channels
- custom: decode_private_channels
- t: ChannelId, Channel
- type: hashmap
- - name: session_id
- type: string
- - name: shard
- custom: decode_shards
- optional: true
- type: '[u64; 2]'
- - name: trace
- array: true
- description: The trace of guilds involved in this connection.
- from: _trace
- optional: true
- type: string
- - name: user
- type: CurrentUser
- - name: version
- from: v
- type: u64
diff --git a/definitions/structs/rich_invite.yml b/definitions/structs/rich_invite.yml
deleted file mode 100644
index 1f9a8e9..0000000
--- a/definitions/structs/rich_invite.yml
+++ /dev/null
@@ -1,59 +0,0 @@
----
-name: RichInvite
-description: >
- Detailed information about an invite. This information can only be retrieved
- by anyone with the [Manage Guild] permission. Otherwise, a minimal amount of
- information can be retrieved via the [`Invite`] struct.
-
- [`Invite`]: struct.Invite.html
- [Manage Guild]: permissions/constant.MANAGE_GUILD.html
-fields:
- - name: channel
- description: >
- A representation of the minimal amount of information needed about the
- [`GuildChannel`] being invited to.
-
- [`GuildChannel`]: struct.GuildChannel.html
- type: InviteChannel
- - name: code
- description: The unique code for the invite.
- type: string
- - name: created_at
- description: When the invite was created.
- type: string
- - name: guild
- description: >
- A representation of the minimal amount of information needed about the
- [`Guild`] being invited to.
-
- [`Guild`]: struct.Guild.html
- type: InviteGuild
- - name: inviter
- description: The user that created the invite.
- type: User
- - name: max_age
- description: >
- The maximum age of the invite in seconds, from when it was created.
- type: u64
- - name: max_uses
- description: >
- The maximum number of times that an invite may be used before it expires.
-
- Note that this does not supercede the [`max_age`] value, if the value of
- [`temporary`] is `true`. If the value of `temporary` is `false`, then the
- invite _will_ self-expire after the given number of max uses.
-
- If the value is `0`, then the invite is permanent.
-
- [`max_age`]: #structfield.max_age
- [`temporary`]: #structfield.temporary
- type: u64
- - name: temporary
- description: >
- Whether the invite self-expires after a certain amount of time or uses.
- type: bool
- - name: uses
- description: >
- The maximum amount of times that an invite may be used before it
- self-expires.
- type: u64
diff --git a/definitions/structs/role.yml b/definitions/structs/role.yml
deleted file mode 100644
index 62f8594..0000000
--- a/definitions/structs/role.yml
+++ /dev/null
@@ -1,51 +0,0 @@
----
-name: Role
-description: >
- Information about a role within a guild. A role represents a set of
- permissions, and can be attached to one or multiple users. A role has
- various miscellaneous configurations, such as being assigned a colour.
- Roles are unique per guild and do not cross over to other guilds in any way,
- and can have channel-specific permission overrides in addition to guild-level
- permissions.
-fields:
- - name: id
- description: The Id of the role. Can be used to calculate its creation date.
- type: RoleId
- - name: colour
- from: color
- description: >
- The colour of the role in 0xRRGGBB format. This is an ergonomic
- representation of the inner value.
- type: Colour
- - name: hoist
- description: >
- Whether the role is pinned above lesser roles, causing members in the role
- to be seen above others.
- type: bool
- - name: managed
- description: Whether the role is managed by an integration service.
- type: bool
- - name: mentionable
- default: false
- description: >
- Whether the role can be mentioned, similar to mentioning a specific member
- or @everyone. Only members of the role will be notified if a role is
- mentioned with this set to true.
- type: bool
- - name: name
- description: The name of the role.
- type: string
- - name: permissions
- description: >
- A set of permissions that the role has been assigned. See the
- [`permissions`] module for more information.
-
- [`permissions`]: permissions/index.html
- type: Permissions
- - name: position
- description: >
- The role's position in the position list. Roles above another are
- considered higher in the role hierarchy in most situations.
-
- The @everyone role is usually either position `-1` or `0`.
- type: i64
diff --git a/definitions/structs/user.yml b/definitions/structs/user.yml
deleted file mode 100644
index 297072e..0000000
--- a/definitions/structs/user.yml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-name: User
-description: Information about a user.
-fields:
- - name: id
- description: >
- The unique Id of the user. Can be used to calculate the account's
- creation date.
- type: UserId
- - name: avatar
- description: Optional avatar hash.
- optional: true
- type: string
- - name: bot
- description: Lets you know if the account is a bot or not.
- default: 'false'
- type: bool
- - name: discriminator
- description: >
- The account's discriminator. The name + discriminator pair is
- always unique.
- type: string
- - name: name
- description: >
- The account's username. Changing username will trigger a
- discriminator change if the pair is not unique.
- from: username
- type: string
diff --git a/definitions/structs/voice_region.yml b/definitions/structs/voice_region.yml
deleted file mode 100644
index 8019b54..0000000
--- a/definitions/structs/voice_region.yml
+++ /dev/null
@@ -1,31 +0,0 @@
----
-name: VoiceRegion
-description: Information about an available voice region.
-fields:
- - name: custom
- description: >
- Whether it is a custom voice region, which is used for events.
- type: bool
- - name: deprecated
- description: >
- Whether it is a deprecated voice region, which you should avoid using.
- type: bool
- - name: id
- description: The internal id of the voice region.
- type: string
- - name: name
- description: A recognizable name of the location of the voice region.
- type: string
- - name: optimal
- description: >
- Whether the voice region is optimal for use for the current user.
- type: bool
- - name: sample_hostname
- description: An example hostname for the region.
- type: string
- - name: sample_port
- description: An example port for the region.
- type: u64
- - name: vip
- description: Whether the voice regions is only for VIPs.
- type: bool
diff --git a/definitions/structs/voice_state.yml b/definitions/structs/voice_state.yml
deleted file mode 100644
index 30dd151..0000000
--- a/definitions/structs/voice_state.yml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-name: VoiceState
-description: A member's state within a voice channel.
-fields:
- - name: channel_id
- optional: true
- type: ChannelId
- - name: deaf
- type: bool
- - name: mute
- type: bool
- - name: self_deaf
- type: bool
- - name: self_mute
- type: bool
- - name: session_id
- type: string
- - name: suppress
- type: bool
- - name: token
- optional: true
- type: string
- - name: user_id
- type: UserId
diff --git a/definitions/structs/webhook.yml b/definitions/structs/webhook.yml
deleted file mode 100644
index a33c754..0000000
--- a/definitions/structs/webhook.yml
+++ /dev/null
@@ -1,47 +0,0 @@
----
-name: Webhook
-description: >
- A representation of a webhook, which is a low-effort way to post messages to
- channels. They do not necessarily require a bot user or authentication to use.
-fields:
- - name: id
- description: The Id of the webhook.
- type: WebhookId
- - name: avatar
- description: >
- The default avatar of the webhook. Note that this can be modified with a
- payload.
- optional: true
- type: string
- - name: channel_id
- description: >
- The Id of the [channel][`GuildChannel`] that owns the webhook.
-
- [`GuildChannel`]: struct.GuildChannel.html
- type: ChannelId
- - name: guild_id
- description: >
- The Id of the [`Guild`] that owns the webhook.
-
- [`Guild`]: struct.Guild.html
- optional: true
- type: GuildId
- - name: name
- description: >
- The default name of the webhook. Note that this can be modified in a
- payload via [`ExecuteWebhook::username`].
-
- [`ExecuteWebhook::username`]: ../utils/builder/struct.ExecuteWebhook.html#method.username
- optional: true
- type: string
- - name: token
- description: The webhook's secure token.
- type: string
- - name: user
- description: >
- The user that created the webhook.
-
-
- **Note**: This is not returned when getting a webhook by its token.
- optional: true
- type: User