Fix Internal error
This commit is contained in:
parent
5e6bb8f2d0
commit
58dbb425ba
1 changed files with 6 additions and 1 deletions
|
@ -240,7 +240,12 @@ pub async fn submit(ctx: Context<'_>, submission: serenity::Attachment) -> Resul
|
||||||
if !repost_here && here {
|
if !repost_here && here {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let data = data.as_object().unwrap();
|
let data = match data.as_object() {
|
||||||
|
Some(data) => data,
|
||||||
|
// "suggestionChannel": "..." is at root level,
|
||||||
|
// and is not an object. Ignore it.
|
||||||
|
None => continue,
|
||||||
|
};
|
||||||
if !data.contains_key("submissionChannel") {
|
if !data.contains_key("submissionChannel") {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue