Customize number of memes in memedump
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2a5a99065b
commit
56acadbc62
10
src/memes.py
10
src/memes.py
@ -271,7 +271,15 @@ async def memeCount(command, message, client):
|
||||
# get a set of random memes
|
||||
async def memeDump(command, message, client):
|
||||
await message.channel.send("Getting your memes...")
|
||||
for i in range(0,5):
|
||||
count = 5
|
||||
if len(command) > 1:
|
||||
try:
|
||||
count = int(command[1])
|
||||
except:
|
||||
print("Tried to parse a number, got (" + command[1] + ")")
|
||||
count = 5
|
||||
|
||||
for i in range(0,count):
|
||||
meme = getRandomMeme()
|
||||
ready_meme = getDiscordReadyObjectFromS3(meme)
|
||||
if isinstance(ready_meme, str):
|
||||
|
@ -10,8 +10,8 @@ async def showHelp(very, useless, arguments):
|
||||
str += " Get a meme. Query for the exact name or search. Paramater is optional\n"
|
||||
str += "!memecount\n"
|
||||
str += " Print total number of memes in the store\n"
|
||||
str += "!memedump\n"
|
||||
str += " Get 5 random memes\n"
|
||||
str += "!memedump [COUNT]\n"
|
||||
str += " Get COUNT random memes. If COUNT is not provided, we default to 5\n"
|
||||
str += "!allmemes QUERY\n"
|
||||
str += " Get all memes that are like the given query\n"
|
||||
str += "!help\n"
|
||||
|
Loading…
Reference in New Issue
Block a user