Some general cleanup

This commit is contained in:
Marco Thomas
2020-08-26 16:21:33 +02:00
parent 983a88c2d3
commit 95eac5b98c
8 changed files with 37 additions and 22 deletions

View File

@@ -10,7 +10,7 @@ from discord.ext import commands
import random
# IMPORTS - internal
import loadconfig
import loadmedia
class MemeError(Exception):
pass
@@ -30,7 +30,7 @@ class Meme(commands.Cog):
if query == "List":
meme_list = ""
for key in loadconfig.__memes_list__.keys():
for key in loadmedia.__memes_list__.keys():
if not meme_list:
meme_list = meme_list + key
else:
@@ -39,7 +39,7 @@ class Meme(commands.Cog):
await ctx.send(f"Currently listed memes: `{meme_list}`")
else:
try:
meme = random.choice(loadconfig.__memes_list__[query])
meme = random.choice(loadmedia.__memes_list__[query])
await ctx.send(meme)
except KeyError as e:
await ctx.send("Meme not found in database")