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.
Here's what's included:
blurple.ui
All the styled components you'll ever need for building user interfaces in discord.- Planned support for modals and more in the future, using discord's new api.
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.- An unopinionated drop-in replacement for the builtin help command.
- A minimal, route-based microframework for registering commands.
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/LeptoFlare/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
Contact me · @LeptoFlare · lepto.tech
As always, distributed under the MIT license. See LICENSE
for more information.
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
blurple.py-0.5.3.tar.gz
(13.1 kB
view hashes)
Built Distribution
blurple.py-0.5.3-py3-none-any.whl
(15.0 kB
view hashes)
Close
Hashes for blurple.py-0.5.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f427e1fdaff89e4696f795d79abf2c96661d651537db07a5172c655dc492ce1 |
|
MD5 | 774a014f66359538687e886f89651c89 |
|
BLAKE2b-256 | 63d13f2c1796161505b05e6c4793bd6de3a356aa36a7e7cc392c0ec17cf3fa38 |