diff options
| author | acdenisSK <[email protected]> | 2017-09-09 14:19:09 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-09-09 14:19:09 +0200 |
| commit | 870a2a5f821c9b0624cad03d873d04a8aad47082 (patch) | |
| tree | 16fa4f0748b61fe189d4b47a184e6ee09cad7cc9 /src/model/channel/channel_category.rs | |
| parent | Implement categories (diff) | |
| download | serenity-870a2a5f821c9b0624cad03d873d04a8aad47082.tar.xz serenity-870a2a5f821c9b0624cad03d873d04a8aad47082.zip | |
`parent_id` -> `category_id`
Diffstat (limited to 'src/model/channel/channel_category.rs')
| -rw-r--r-- | src/model/channel/channel_category.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/model/channel/channel_category.rs b/src/model/channel/channel_category.rs index f8374fc..a0673fd 100644 --- a/src/model/channel/channel_category.rs +++ b/src/model/channel/channel_category.rs @@ -11,7 +11,8 @@ pub struct ChannelCategory { /// Id of this category. pub id: ChannelId, /// If this category belongs to another category. - pub parent_id: Option<ChannelId>, + #[serde(rename = "parent_id")] + pub category_id: Option<ChannelId>, /// The position of this category. pub position: i64, /// Indicator of the type of channel this is. @@ -103,9 +104,9 @@ impl ChannelCategory { let edited = f(EditChannel(map)).0; http::edit_channel(self.id.0, &edited).map(|channel| { - let GuildChannel { id, parent_id, permission_overwrites, nsfw, name, position, kind, .. } = channel; + let GuildChannel { id, category_id, permission_overwrites, nsfw, name, position, kind, .. } = channel; - *self = ChannelCategory { id, parent_id, permission_overwrites, nsfw, name, position, kind }; + *self = ChannelCategory { id, category_id, permission_overwrites, nsfw, name, position, kind }; () }) } |