Add other upload improvements #7
@ -210,6 +210,7 @@ def nameBuilder(command):
|
||||
return uploaded_file_name
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Calldict methods
|
||||
|
||||
@ -280,7 +281,7 @@ async def memeDump(command, message, client):
|
||||
return "Enjoy your memes :)"
|
||||
|
||||
# get an uploaded meme and save it
|
||||
async def uploadMeme(command, message, client):
|
||||
async def uploadMeme(command, message, discordClient):
|
||||
global memes_to_md5
|
||||
|
||||
uploader_tags = Tags.new_object_tags()
|
||||
@ -291,6 +292,11 @@ async def uploadMeme(command, message, client):
|
||||
file_names = []
|
||||
|
||||
if len(message.attachments) <= 0:
|
||||
if message.reference is not None: # this is a reply upload
|
||||
m = await message.channel.fetch_message(message.reference.message_id)
|
||||
result = await uploadMeme(command, m, client)
|
||||
return result
|
||||
else:
|
||||
return "You didn't attach anything! Please attach a file to upload"
|
||||
|
||||
#TODO left off on adding logic to
|
||||
|
@ -16,6 +16,10 @@ async def showHelp(very, useless, arguments):
|
||||
str += " Get all memes that are like the given query\n"
|
||||
str += "!help\n"
|
||||
str += " Print this message\n"
|
||||
str += "!up [NAME]\n"
|
||||
str += " Upload a meme. If NAME is provided it will be named as such.\n"
|
||||
str += " You need to either attach the meme with the message, or reply to a\n"
|
||||
str += " message with the meme you want to upload\n"
|
||||
str += "```"
|
||||
return str
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user