From cdf5ff2f3a82390dbc093bf774a80f54fcd5d503 Mon Sep 17 00:00:00 2001 From: insert-usernamehere Date: Mon, 25 Jan 2021 16:52:36 -0500 Subject: [PATCH] Add files via upload --- database bot.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 database bot.py diff --git a/database bot.py b/database bot.py new file mode 100644 index 0000000..a614966 --- /dev/null +++ b/database bot.py @@ -0,0 +1,26 @@ +import discord +from discord.ext import commands +from time import sleep +import os +import datetime +import wget +from zipfile import ZipFile +import shutil + + +client = commands.Bot(command_prefix='.') + + +@client.command() +async def save(ctx): + await ctx.message.attachments[0].save("newcharacter.zip") + + await ctx.send("adding to database please wait") + zf = ZipFile('newcharacter.zip', 'r') + zf.extractall('a') + zf.extractall('b') + zf.close() + shutil.make_archive('a/test', 'zip', 'a') + await ctx.send("added to database") + +client.run('NzUyMjUxMDU4OTA2MjAyMTQy.X1U6ZA.cIkHHcZIqAm-Xg3W_3DlOcTuvSA')