Skip to main content

A front-end framework for discord.py

Project description

blurple.py

A front-end framework for discord.py

PyPI License Stars

Blurple.py is a framework built on top of discord.py, giving you the tools you need to build discord bots with convenience.

:warning: hey! thanks for checking this library out. although this library is not actively being maintained, it is stable and you probably won't encounter any issues if you use it! if you do happen to run into any issues, feel free to make an issue and preferrably PR and i'll get to it as soon as i can :)

Here's what's included:

  1. blurple.ui All the styled components you'll ever need for building user interfaces in discord.
    • Styled alerts, toasts that automatically dismiss, and more.
  2. blurple.io Robust functions that enable you to build stable, multi-step commands with ease.
    • Support for multi-event replies, and timeout handling by default.
  3. blurple.ext Utilities and sane defaults for discord.ext commands.
    • Drop-in replacements, addons, and other small gadgets.

usage

Documentation can be found here.

installation

  1. Make sure your python version is up-to-date.
  2. Install the package with pip install blurple.py.

example with blurple.ui

  import discord
  from discord.ext import commands
+ from blurple import ui

  bot = commands.Bot(command_prefix='!')

  @bot.command()
  async def ping(ctx):
-     await ctx.send('Pong!')
+     await ctx.send(embed=ui.Alert(ui.Style.SUCCESS,
+         title="Pong!",
+         description=f"Latency: `{round(bot.latency*1000)}ms`")
+     )

  bot.run('token')

Usage

running locally

  1. Clone the repository git clone https://github.com/cerusabi/blurple.py.git
  2. Create a .env in the repository root with your token: TOKEN=kpXVCJ9.pLY.Q6m9F
  3. The repo contains a test.py file used for testing, simply run the file python3 test.py

@cerusabicerusabi.github.io

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

blurple-1.0.3.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

blurple-1.0.3-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file blurple-1.0.3.tar.gz.

File metadata

  • Download URL: blurple-1.0.3.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for blurple-1.0.3.tar.gz
Algorithm Hash digest
SHA256 15bffd17d98cde406afe837c539a8aa5cf2dfc58536682540e88ce2cdcdc0967
MD5 00887640e9c19654b18b5be5a17a0ba4
BLAKE2b-256 425ba077b9a584ed29f86c3b4a5aadabed99b734e844f0daa24a033cb3e75128

See more details on using hashes here.

File details

Details for the file blurple-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: blurple-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for blurple-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 01cc36a0dc503d3cdc28a86fd8138fd52e0be7d5e2fe442938375b06d0b95f0c
MD5 d4bbaaefa28d4537b2686c8f31882fe7
BLAKE2b-256 b42aa2747e410d6d4797f0b828213cf2550f35930143412dba91d2432432c66c

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