From 651ad9dffed63e88d66daec523b78b6ed210401f Mon Sep 17 00:00:00 2001 From: jude Date: Sat, 21 May 2022 13:54:13 +0100 Subject: [PATCH] defer upload --- src/cmds/manage.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cmds/manage.rs b/src/cmds/manage.rs index 38dde66..d708f36 100644 --- a/src/cmds/manage.rs +++ b/src/cmds/manage.rs @@ -20,6 +20,8 @@ pub async fn upload_new_sound( #[description = "Name to upload sound to"] name: String, #[description = "Sound file (max. 2MB)"] file: Attachment, ) -> Result<(), Error> { + ctx.defer().await?; + fn is_numeric(s: &String) -> bool { for char in s.chars() { if char.is_digit(10) {