Skip to main content

Random memes fetched for use in discord.py bot commands.

Project description

dpyrandmeme: random memes for discord.py

What does the library do? This library simply uses aiohttp to collect json data from a reddit page and turns it into a link inorder to be used while also storing the memes and returning the meme as a discord embed before sending back to the discord bot to send to the member who sent that command. It is the same meme library that is currently being used inside Paradigm.
PyPi library link: https://pypi.org/project/dpyrandmeme/

USAGE OF CODE IN A DISCORD SLASH COMMAND COG:

"""
  This snippet is the actual meme slash command code from the Paradigm Source Code.
"""

from discord.ext import commands
from dpyrandmeme import pyrandmeme


class Meme(commands.Cog):
    def __init__(self, client):
        self.client = client

    @commands.hybrid_command()
    @commands.cooldown(1, 1, commands.BucketType.user)
    async def meme(self, ctx):
        """
        Get some random memes from reddit.
        """

        await ctx.send(embed=await pyrandmeme())

async def setup(client):
    await client.add_cog(Meme(client))


**Credits:**

d33pak123: https://github.com/d33pak123/Pyrandmeme-python-library,
Microsoft for the template.



©2023 aviance. Project is open-source through the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dpyrandmeme-1.0.0rc27.post1.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dpyrandmeme-1.0.0rc27.post1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file dpyrandmeme-1.0.0rc27.post1.tar.gz.

File metadata

  • Download URL: dpyrandmeme-1.0.0rc27.post1.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.2

File hashes

Hashes for dpyrandmeme-1.0.0rc27.post1.tar.gz
Algorithm Hash digest
SHA256 c72bb51d8c128d48e3b01db0cf74d3fe1e30c74bcf8a201b07e6cd6ceeca3a67
MD5 ed5ec11f143add6b2eac8165818b8b13
BLAKE2b-256 07cafd43a4ebe2f0c3f88cba1cc570959361332dd95d3bf7bb1b7ea4c6c91763

See more details on using hashes here.

File details

Details for the file dpyrandmeme-1.0.0rc27.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for dpyrandmeme-1.0.0rc27.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 bf38dff5a1d1cc1731da539c65a7f944f2edb26f4fd529d841f2c604c4495f95
MD5 d0c4e015b4f0a18428249d57f33176a2
BLAKE2b-256 5c0bacc98d261316171a4f3f42274f2c3b063826702a9004bc3dceffa468b73f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page