A front-end framework for discord.py
Project description
blurple.py
A front-end framework for discord.py
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:
blurple.ui
All the styled components you'll ever need for building user interfaces in discord.- Styled alerts, toasts that automatically dismiss, and more.
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.
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
- Make sure your python version is up-to-date.
- 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')
running locally
- Clone the repository
git clone https://github.com/cerusabi/blurple.py.git
- Create a
.env
in the repository root with your token:TOKEN=kpXVCJ9.pLY.Q6m9F
- The repo contains a
test.py
file used for testing, simply run the filepython3 test.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file blurple.py-1.0.3.tar.gz
.
File metadata
- Download URL: blurple.py-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1da19dab628708c3c8468e39b082b5e05fba1708149dcc48b59e0e31f6335830 |
|
MD5 | 2dab3b2cea353a200858a1c2580b824f |
|
BLAKE2b-256 | 222e0ebc9f544f6b7b5eefa99619543425e63a0b0373c5fa2eb609de6d8cc577 |
File details
Details for the file blurple.py-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: blurple.py-1.0.3-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55414c72c02e778270040d1676f3097b842e499b4d490d599a0ff58c1099fcfe |
|
MD5 | b6e5615645ff8450ab295565814dda72 |
|
BLAKE2b-256 | aa94031192243cdb7f71fb9195fdad728ba986b96cb018de584bec09cb7fca2b |