added a log for when sound fails to upload

This commit is contained in:
jude 2020-06-26 01:09:16 +01:00
parent 3465d7aab6
commit 7d72135123
2 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,7 @@ CREATE TABLE servers (
); );
CREATE TABLE sounds ( CREATE TABLE sounds (
id INT UNSIGNED NOT NULL, id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(20), name VARCHAR(20),
plays INT UNSIGNED NOT NULL DEFAULT 0, plays INT UNSIGNED NOT NULL DEFAULT 0,
public BOOL NOT NULL DEFAULT 1, public BOOL NOT NULL DEFAULT 1,

View File

@ -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?; 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?; msg.channel_id.say(&ctx, "Sound failed to upload.").await?;
} }
} }