Skip to content

Commit

Permalink
Make changes based on PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nwerosama committed Jan 19, 2025
1 parent ebe2933 commit 90f2c5b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/model/guild/guild_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,14 +342,15 @@ impl GuildId {
http: &Http,
name: &str,
image: &str,
roles: Vec<RoleId>,
roles: Option<Vec<RoleId>>,
reason: Option<&str>,
) -> Result<Emoji> {
#[derive(serde::Serialize)]
struct CreateEmoji<'a> {
name: &'a str,
image: &'a str,
roles: Vec<RoleId>,
#[serde(skip_serializing_if = "Option::is_none")]
roles: Option<Vec<RoleId>>,
}

let body = CreateEmoji {
Expand Down Expand Up @@ -591,6 +592,7 @@ impl GuildId {
#[derive(serde::Serialize)]
struct EditEmoji<'a> {
name: &'a str,
#[serde(skip_serializing_if = "Option::is_none")]
roles: Option<Vec<RoleId>>,
}

Expand Down

0 comments on commit 90f2c5b

Please sign in to comment.