commit before utter laptop death
This commit is contained in:
parent
4e111b410d
commit
d6b51c787a
11 changed files with 163 additions and 221 deletions
|
@ -1,20 +1,17 @@
|
|||
import discord
|
||||
from discord.ext import commands
|
||||
from modules.globalvars import ownerid
|
||||
from modules.permission import requires_admin
|
||||
class FileSync(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
self.mode = None
|
||||
self.peer_id = None
|
||||
self.awaiting_file = False
|
||||
|
||||
@requires_admin()
|
||||
@commands.command()
|
||||
async def syncfile(self, ctx, mode: str, peer: discord.User):
|
||||
self.mode = mode.lower()
|
||||
self.peer_id = peer.id
|
||||
if ctx.author.id != ownerid:
|
||||
await ctx.send("You don't have permission to execute this command.")
|
||||
return
|
||||
if self.mode == "s":
|
||||
await ctx.send(f"<@{self.peer_id}> FILE_TRANSFER_REQUEST")
|
||||
await ctx.send(file=discord.File("memory.json"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue