From 9132b79ff706d97c0ee4c0e1d115a009f79e5bce Mon Sep 17 00:00:00 2001 From: insert-usernamehere Date: Mon, 25 Jan 2021 20:07:02 -0500 Subject: [PATCH] Update database bot.py --- database bot.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/database bot.py b/database bot.py index f900b56..868deeb 100644 --- a/database bot.py +++ b/database bot.py @@ -13,9 +13,9 @@ client = commands.Bot(command_prefix='.') @client.command() async def addcharacter(ctx): + await ctx.send("adding to database please wait") await ctx.message.attachments[0].save("newcharacter.zip") - await ctx.send("adding to database please wait") zf = ZipFile('newcharacter.zip', 'r') zf.extractall('public/singlecharacter') zf.close() @@ -29,11 +29,13 @@ async def addcharacter(ctx): pass shutil.make_archive('public/characters', 'zip', 'public/singlecharacter') await ctx.send("added to database") - + + +@client.command() async def addsound(ctx): + await ctx.send("adding to database please wait") await ctx.message.attachments[0].save("newsound.zip") - await ctx.send("adding to database please wait") zf = ZipFile('newsound.zip', 'r') zf.extractall('public/singlesound') zf.close() @@ -47,5 +49,12 @@ async def addsound(ctx): pass shutil.make_archive('public/sounds', 'zip', 'public/singlesound') await ctx.send("added to database") + +@client.command() +async def setip(ctx): + ip = userInput = ctx.message.content[7:] + with open("public/serverlist.txt", "w+") as hisc: + hisc.write(str(ip)+":best bois courthouse") + await ctx.send("changed ip to "+str(ip)) client.run('botid')