diff --git a/cogs/meme.py b/cogs/meme.py index 37fb721..480fb68 100644 --- a/cogs/meme.py +++ b/cogs/meme.py @@ -4,9 +4,13 @@ Send spicy memes to chat https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html """ -# IMPORTS +# IMPORTS - external import discord from discord.ext import commands +import random + +# IMPORTS - internal +import loadconfig class MemeError(Exception): pass @@ -24,7 +28,7 @@ class Meme(commands.Cog): """ query = meme.capitalize() - if query == "list": + if query == "List": meme_list = "" for key in loadconfig.__memes_list__.keys(): if not meme_list: @@ -35,7 +39,8 @@ class Meme(commands.Cog): await ctx.send(f"Currently listed memes: `{meme_list}`") else: try: - await ctx.send(loadconfig.__memes_list__[query] + meme = random.choice(loadconfig.__memes_list__[query]) + await ctx.send(meme) except KeyError as e: await ctx.send("Meme not found in database") diff --git a/cogs/music.py b/cogs/music.py index 8972420..a86256e 100644 --- a/cogs/music.py +++ b/cogs/music.py @@ -144,6 +144,7 @@ class Song: description=description, colour=discord.Colour.blue() )) + embed.add_field(name='Uploader', value='[{0.source.uploader}]({0.source.uploader_url})'.format(self)) embed.add_field(name="Duration", value=self.source.duration) embed.add_field(name="Requested by", value=self.requester.mention) embed.add_field(name='URL', value='[Click]({0.source.url})'.format(self)) diff --git a/config/memes.py b/config/memes.py index edc176b..467cc64 100644 --- a/config/memes.py +++ b/config/memes.py @@ -6,11 +6,20 @@ olli = [ cenk = [ "https://cdn.discordapp.com/attachments/541641216110886932/650706285431357440/geh.jpeg", + "https://cdn.discordapp.com/attachments/541641216110886932/650705814419537928/versteck.jpeg", + "https://cdn.discordapp.com/attachments/541641216110886932/650705816491393025/nimm.jpeg", + "https://cdn.discordapp.com/attachments/541641216110886932/650705817770917895/behalt.jpeg", + "https://cdn.discordapp.com/attachments/541641216110886932/650705818559447051/gib.jpeg" + ] + +marc = [ + "https://cdn.discordapp.com/attachments/541641216110886932/626153093226299411/MaddlsticksTransparent.png" ] # Exports __memes_list__ = { "Olli": olli, - "Cenk": cenk + "Cenk": cenk, + "Marc": marc } diff --git a/loadconfig.py b/loadconfig.py index f12f6ff..8b8c6b0 100644 --- a/loadconfig.py +++ b/loadconfig.py @@ -28,7 +28,6 @@ try: from config.cogs import __cogs__ from config.status import __activity__ from config.media import __media_anime__, __media_girl__ - from config.memes import __olli_memes__ from config.memes import __memes_list__ except ImportError as error: print(f"Error while importing: {error}")