This repository has been archived on 2023-10-23. You can view files and clone it, but cannot push or open issues or pull requests.
filesystem-bot/database bot.py

27 lines
634 B
Python
Raw Normal View History

2021-01-25 21:52:36 +00:00
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")
2021-01-25 21:54:12 +00:00
client.run('botid')