From bd8965ada2d5122fd50fe6b3dd9fea27c556c16a Mon Sep 17 00:00:00 2001 From: insert-usernamehere Date: Mon, 29 Mar 2021 12:41:51 -0400 Subject: [PATCH] Update database bot.py --- database bot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/database bot.py b/database bot.py index 9ae1085..f09bee5 100644 --- a/database bot.py +++ b/database bot.py @@ -135,6 +135,10 @@ async def getsound(ctx): @client.command() async def downloadcharacter(ctx): filepath = ctx.message.content[19:] + if filepath == '': + filepath = 'something that does not exist' + else: + pass fullfilepath = 'public/singlecharacter/'+str(filepath) if os.path.isdir(fullfilepath): await ctx.send("grabbing the character please wait") @@ -145,7 +149,7 @@ async def downloadcharacter(ctx): urlpath = finalfilepath.replace(" ", "_") os.rename(finalfilepath,urlpath) newurlpath = finalfilepath.replace("/public", "") - await ctx.send("http://fierce-push.auto.playit.gg:47746/"+str(newurlpath)) + await ctx.send("http://fierce-push.auto.playit.gg:47746/"+str(urlpath)) await ctx.send("note: this link will become invalid in 5 minutes") delfile = threading.Thread(target=closefile) delfile.start()