Skip to content

Commit

Permalink
Cleanup YAML definition layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Hellyer committed Dec 15, 2016
1 parent 0708ccf commit 00fb61b
Show file tree
Hide file tree
Showing 46 changed files with 211 additions and 185 deletions.
26 changes: 13 additions & 13 deletions definitions/enums/channel_type.yml
@@ -1,32 +1,32 @@
---
name: ChannelType
description: "A representation of a type of channel."
description: A representation of a type of channel.
variants:
- variant: Group
description: "An indicator that the channel is the channel of a [`Group`].
description: >
An indicator that the channel is the channel of a [`Group`].
[`Group`]: struct.Group.html"
[`Group`]: struct.Group.html
name: group
number: 3
- variant: Private
description: "An indicator that the channel is a [`PrivateChannel`].
description: >
An indicator that the channel is a [`PrivateChannel`].
[`PrivateChannel`]: struct.PrivateChannel.html"
[`PrivateChannel`]: struct.PrivateChannel.html
name: private
number: 1
- variant: Text
description: "An indicator that the channel is a text [`GuildChannel`].
description: >
An indicator that the channel is a text [`GuildChannel`].
[`GuildChannel`]: struct.GuildChannel.html"
[`GuildChannel`]: struct.GuildChannel.html
name: text
number: 0
- variant: Voice
description: "An indicator that the channel is a voice [`GuildChannel`].
description: >
An indicator that the channel is a voice [`GuildChannel`].
[`GuildChannel`]: struct.GuildChannel.html"
[`GuildChannel`]: struct.GuildChannel.html
name: voice
number: 2
19 changes: 9 additions & 10 deletions definitions/enums/default_avatar.yml
@@ -1,26 +1,25 @@
---
name: DefaultAvatar
description: "An enum that represents a default avatar. The default avatar is
calculated via the result of `discriminator % 5`.
description: >
An enum that represents a default avatar. The default avatar is calculated via
the result of `discriminator % 5`.
The hash of the avatar can be retrieved via calling [`name`] on the enum.
[`name`]: #method.name"
[`name`]: #method.name
variants:
- variant: Blurple
description: "The avatar when the result is 0."
description: The avatar when the result is 0.
name: 6debd47ed13483642cf09e832ed0bc1b
- variant: Grey
description: "The avatar when the result is 1."
description: The avatar when the result is 1.
name: 322c936a8c8be1b803cd94861bdfa868
- variant: Green
description: "The avatar when the result is 2."
description: The avatar when the result is 2.
name: dd4dbc0016779df1378e7812eabaa04d
- variant: Orange
description: "The avatar when the result is 3."
description: The avatar when the result is 3.
name: 0e291f67c9274a1abdddeb3fd919cbaa
- variant: Red
description: "The avatar when the result is 4."
description: The avatar when the result is 4.
name: 1cbd08c76f8af6dddce02c5138971129
3 changes: 1 addition & 2 deletions definitions/enums/feature.yml
Expand Up @@ -19,6 +19,5 @@ variants:
URL.
name: VANITY_URL
- variant: VipRegions
description: >
The guild has access to VIP voice channel regions.
description: The guild has access to VIP voice channel regions.
name: VIP_REGIONS
13 changes: 6 additions & 7 deletions definitions/enums/game_type.yml
@@ -1,15 +1,14 @@
---
name: GameType
description: "The type of activity that is being performed when playing a
[`Game`].
description: >
The type of activity that is being performed when playing a [`Game`].
[`Game`]: struct.Game.html"
[`Game`]: struct.Game.html
variants:
- variant: Playing
description: "An indicator that a person is playing a game."
description: An indicator that a person is playing a game.
number: 0
- variant: Streaming
description: "An indicator that a person is streaming something to a
service."
description: >
An indicator that a person is streaming something to a service.
number: 1
7 changes: 3 additions & 4 deletions definitions/enums/incident_status.yml
@@ -1,10 +1,9 @@
---
name: IncidentStatus
description: "The type of status update during a
[service incident][`Incident`].
description: >
The type of status update during a [service incident][`Incident`].
[`Incident`]: struct.Incident.html"
[`Incident`]: struct.Incident.html
variants:
- variant: Identified
name: identified
Expand Down
4 changes: 2 additions & 2 deletions definitions/enums/message_type.yml
@@ -1,8 +1,8 @@
---
name: MessageType
description: >
Allows messages to be differentiated between regular ones
and system ones like pins and clyde's responses.
Allows messages to be differentiated between regular ones and system ones like
pins and group call updates.
variants:
- variant: Regular
number: 0
Expand Down
4 changes: 1 addition & 3 deletions definitions/enums/notification_level.yml
@@ -1,8 +1,6 @@
---
name: NotificationLevel
description: >
Different level of notification levels such as
mention-only, all messages, etc.
description: Identifier for the notification level of a channel.
variants:
- variant: All
number: 0
Expand Down
1 change: 1 addition & 0 deletions definitions/structs/affected_component.yml
Expand Up @@ -3,6 +3,7 @@ name: AffectedComponent
description: >
A component that was affected during a service incident.
This is pulled from the Discord status page.
fields:
- name: name
Expand Down
55 changes: 32 additions & 23 deletions definitions/structs/application_info.yml
@@ -1,56 +1,65 @@
---
name: ApplicationInfo
description: "Information about a user's application. An application does not
necessarily have an associated bot user."
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](./struct.BotApplication.html) for more information."
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](./struct.Guild.html). While a bot is
private, only the owner may invite it to a guild."
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."
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."
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.
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."
present.
optional: true
type: u64
- name: icon
description: "A hash pointing to the application's icon. This is not
necessarily equivilant to the bot user's avatar. If there is no icon
assigned, then this is None."
description: >
A hash pointing to the application's icon. This is not necessarily
equivilant 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."
description: The numeric id of the application.
type: UserId
- name: name
description: "The name assigned to the application by the application
owner."
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."
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."
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
equivilant to an application's bot user's token."
description: >
The given secret to the application. Note that this is not equivilant to
an application's bot user's token.
type: string
26 changes: 13 additions & 13 deletions definitions/structs/attachment.yml
@@ -1,34 +1,34 @@
---
name: Attachment
description: >
A file uploaded with a message. Not to be confused with [embed][`Embed`]s.
A file uploaded with a message. Not to be confused with [`Embed`]s.
[`Embed`]: struct.Embed.html
[`Embed`]: struct.Embed.html
fields:
- name: id
description: "The unique ID given to this attachment."
description: The unique ID given to this attachment.
type: string
- name: filename
description: "The filename of the file that was uploaded. This is equivilant
to what the uploader had their file named."
description: >
The filename of the file that was uploaded. This is equivilant 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."
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."
description: The proxy URL.
type: string
- name: size
description: "The size of the file in bytes."
description: The size of the file in bytes.
type: u64
- name: url
description: "The URL of the uploaded attachment."
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."
description: >
If the attachment is an image, then the width of the image is provided.
optional: true
type: u64
21 changes: 12 additions & 9 deletions definitions/structs/bot_application.yml
Expand Up @@ -3,30 +3,33 @@ name: BotApplication
description: Information about an application with an application's bot user.
fields:
- name: id
description: "The Id of the bot user."
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."
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."
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."
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."
description: The username.
from: username
type: string
- name: token
description: "The token used to login to the bot user.
description: >
The token used to login to the bot user.
**Note**: Keep this information private, as untrusted users can use it to
log into your bot."
perform any action on a bot.
type: string
12 changes: 5 additions & 7 deletions definitions/structs/bot_gateway.yml
@@ -1,19 +1,17 @@
---
name: BotGateway
description: "A representation of the data retrieved from the bot gateway
endpoint.
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"
[`Gateway`]: struct.Gateway.html
fields:
- name: shards
description: "The number of shards that is recommended to be used by the
bot."
description: The number of shards that is recommended to be used by the bot.
type: u64
- name: url
description: "The gateway to connect to."
description: The gateway to connect to.
type: string

0 comments on commit 00fb61b

Please sign in to comment.