Skip to main content

A wrapper used for meme generating using Discord API

Project description

Noodles API wrapper

A wrapper for Noodles API used as a meme generator and for welcome banners using the Discord interface.

Notices:

  • This module was designed for discord.py 1.7+ but may work with older versions, use at your own risk however.

Installation:

Install with pip:
pip install noodleswrapper

Code examples:

Sample code with lisastage (Main file):
#Headers (Authentication) is optional.. for now.
import discord
from discord.ext import commands
import noodleswrapper #This is optional, assuming you've pip installed it, still worth to keep it though
from noodleswrapper import noodle

intents = discord.Intents.all() #Allow all the intents
client = commands.Bot(command_prefix = '!', intents=intents)

@client.command()
async def lisastage(ctx, *, text):
    pic = await noodle.lisastage('text') #'text' is what you want it to say
    try:
        await ctx.send(file = pic) #This should return a neat image. Note that a file is always returned so you need to send as a file.
    except: #If there's a ratelimit, the response will be sent as a string object
        await ctx.send(pic)
Sample code with lisastage (Cog):
#Headers (Authentication) is optional.. for now.
import discord
from discord.ext import commands
import noodleswrapper#This is optional, assuming you've pip installed it, still worth to keep it though
from noodleswrapper import noodle

class Noodle(commands.Cog):
    """Commands using Noodles wrapper."""

    def __init__(self, client):
      self.client = client

    @commands.command()
    async def worthless(self, ctx, *, message):
      text = await noodle.worthless(message) #'test' is what you want it to say
      try:
        await ctx.send(file = text) #This should return a neat image. Note that a file is always returned so you need to send as a file.
      except: #If there's a ratelimit, the response will be sent as a string object
        await ctx.send(text)

def setup(client):
  client.add_cog(Noodle(client)) #Must be the same as the class name

Endpoints:

You can get a complete list here, but for now, the following are valid endpoints for this wrapper, with their inputs in order:

  • worthless (text)
  • drake (Top text, bottom text)
  • presidential (Text)
  • spongebobburnpaper (Text)
  • lisastage (Text)
  • changemind (Text)
  • awkwardmokey (Text)
  • blur (Image link)
  • circle (Image link)
  • invert (Image link)
  • edge (Image link)
  • wide (Image link)
  • uglyupclose (Image link)
  • clown (Image link)
  • restpeace (Image link)
  • affectbaby (Image link)
  • trash (Image link)
  • welcomebanner (background, avatar, title, subtitle, textcolor)
  • boostercard(Image link)
  • balancecard(background, avatar, title, top, bottom, textcolor)

Quota:

Due to recent spamming incidents, quotas were added to stop the API from going down from abuse. The rates are shown below:

Default free tier

  • 1 request per second
  • 50 requests per hour
  • 250 requests per day

Hobby tier (£3)

  • 2 requests per second
  • 80 requests per hour
  • 380 requests per day

Standard tier (£7)

  • 3 requests per second
  • 200 requests per hour
  • 800 requests per day

If you need more requests per day, contact either Cypher_Guy#0758 (Package maker) or French Noodles#6046 (API maker) on Discord or click here to join the official server.

Links:

Changelog:

  • Version 0.2: Made all the code asynchronous, meaning it runs faster. In addition, renamed a few endpoints to make it easier for users to type.
  • Version 0.1.10: Edited README with updated example, deprecated version 0.1.9 due to an update which required a rewrite of code
  • Version 0.1.9: Edited relevant links, including list of endpoints and information regarding the API
  • Version 0.1.8: Edited code to account for ratelimits
  • Version 0.1.7: Updated menu to include Github, deprecated version 0.1.4.1
  • Version 0.1.6: Updated menu to include more quotes
  • Version 0.1.5: Fixed the affectbaby endpoint, updated code, marked as Beta, deprecated version 0.1.4, Added changelog section to menu / README file
  • Version 0.1.4.1: Added boostercard and welcomebanner endpoints
  • Version 0.1.4: Alpha release of Noodleswrapper

Have a nice day!

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

noodleswrapper-0.2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

noodleswrapper-0.2-py2.py3-none-any.whl (5.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file noodleswrapper-0.2.tar.gz.

File metadata

  • Download URL: noodleswrapper-0.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0

File hashes

Hashes for noodleswrapper-0.2.tar.gz
Algorithm Hash digest
SHA256 9f2eed7834bdebe5b3f41aabc104639a723e1a1684cca3d470fb285c8d287a2a
MD5 d2f6e98bf2157e270d5fc490450b2c04
BLAKE2b-256 e1a5743d1a2a02b98fa722016849e6acc5ebd0b133a2fd759c80657e93015be7

See more details on using hashes here.

File details

Details for the file noodleswrapper-0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: noodleswrapper-0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0

File hashes

Hashes for noodleswrapper-0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 640902c78a654805e2d31653d4088c72f388bc69f3dadf2419bcb0e9da1a58c6
MD5 5cc8362b5081933b3fe498c3de9953f7
BLAKE2b-256 3df43104b39f88961bcd4968b8cc4e6b5ac947bb9e2ef765ec36bfef14a1f5e6

See more details on using hashes here.

Supported by

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