From 7d72135123d954a61c1ce8dc9993760a78f2a218 Mon Sep 17 00:00:00 2001 From: jude Date: Fri, 26 Jun 2020 01:09:16 +0100 Subject: [PATCH] added a log for when sound fails to upload --- create.sql | 2 +- src/main.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/create.sql b/create.sql index d61ed5a..a04d233 100644 --- a/create.sql +++ b/create.sql @@ -9,7 +9,7 @@ CREATE TABLE servers ( ); CREATE TABLE sounds ( - id INT UNSIGNED NOT NULL, + id INT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(20), plays INT UNSIGNED NOT NULL DEFAULT 0, public BOOL NOT NULL DEFAULT 1, diff --git a/src/main.rs b/src/main.rs index 2d1ff3e..9ddafe2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -732,7 +732,8 @@ async fn upload_new_sound(ctx: &Context, msg: &Message, args: Args) -> CommandRe msg.channel_id.say(&ctx, "Sound has been uploaded").await?; } - Err(_) => { + Err(e) => { + println!("Error occured during upload: {:?}", e); msg.channel_id.say(&ctx, "Sound failed to upload.").await?; } }