Browse Source

Fix unwrapping of None choices

master
NGnius (Graham) 3 years ago
parent
commit
4c3acee80d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/discord.rs

+ 2
- 2
src/discord.rs View File

@@ -408,7 +408,7 @@ impl ApplicationCommandOption {
description: description.to_string(),
required: *required,
options: None,
choices: Some(choices.clone().unwrap()),
choices: choices.clone(),
},
ApplicationCommandOption::Integer { name, description, required, choices} => ApplicationCommandOptionRaw {
type_: 4,
@@ -416,7 +416,7 @@ impl ApplicationCommandOption {
description: description.to_string(),
required: *required,
options: None,
choices: Some(choices.clone().unwrap()),
choices: choices.clone(),
},
ApplicationCommandOption::Boolean { name, description, required} => ApplicationCommandOptionRaw {
type_: 5,


Loading…
Cancel
Save