😻 Bot UI Kitty
A collection of reusable, dynamic, and intuitive Discord UI views, built on top of Pycord's Bot UI Kit.
This project was originally created for personal use in my (way too many) Discord bots, but I decided to make it more easily accessible just in case other bot developers find it helpful. 💜
Currently, the only supported Discord library is Pycord, because that's the one that most of my bots happen to use. I'd love to extend support to other libraries too, but I'm not sure when I'll be able to make the time to do so. In the meantime, if you're using a different library, check out my other utility kit for Discord bots – Botstrap!
Contributions to this project are very welcome, as long as they pass all the checks to keep it green and healthy. ✅
Installation
pip install -U bot-ui-kitty
Python 3.10 or higher is required. It's also generally a good idea to
upgrade pip (python -m pip install -U pip).
For Development
git clone https://github.com/nuztalgia/bot-ui-kitty.git
cd bot-ui-kitty
pip install -e .
This will create an editable installation of bot-ui-kitty in your current
environment. Any changes you make to the code will immediately take effect, so
using a virtual env is highly recommended!
Available Views
Dynamic Select
This view is designed to handle any use case that calls for selecting a single item from a sequence of possible options. It'll automatically choose to display either a row of buttons, a dropdown menu, or a combination of both (to emulate pagination) depending on the number of options you throw at it! 🤹
-
Example 1: Choose your starter Pokemon! (3 options)
number = await uikitty.dynamic_select( ctx, content="Choose your starter Pokemon!", **{"🌱 Bulbasaur": 1, "🔥 Charmander": 4, "💧 Squirtle": 7}, ) await ctx.edit(content=f"Your Pokemon's number is **#00{number}**!", view=None)
-
Example 2: What time is it, Mr. Wolf? (24 options)
time = await uikitty.dynamic_select( ctx, *[f"{str(i).zfill(2)}:00" for i in range(24)], select_placeholder="What time is it, Mr. Wolf?", ) await ctx.edit(content=f"It's ~~{time}~~ **DINNER TIME!!!**", view=None)
-
Example 3: I heard you like chemistry... (119 options)
element = await uikitty.dynamic_select( ctx, embed=Embed(title="Select an element to learn more about it!", color=color), **elements_data, ) embed = Embed( title=element["name"], description=element["summary"], url=element["source"], ) await ctx.edit(embed=embed, view=None)
Note:
elements_datain the above snippet is sourced from Bowserinator/Periodic-Table-JSON.
More types of views will be coming soon. Watch this space! 👀
License
Copyright © 2022 Nuztalgia. Released under the Apache License, Version 2.0.
Metadata
Release files for bot-ui-kitty 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bot-ui-kitty-0.1.5.tar.gz | 18.2 kB | Without provenance | Details for bot-ui-kitty-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bot_ui_kitty-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for bot_ui_kitty-0.1.5-py3-none-any.whl |
Total release size: 32.3 kB
Release files / bot-ui-kitty-0.1.5.tar.gz
| Download URL | bot-ui-kitty-0.1.5.tar.gz |
|---|---|
| Size | 18.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cfdf6992800f25804b0b3a9fd970cc01e94104bdacf944d5d80c5cdfab325a48
|
|
BLAKE2b-256 checksum How to use checksums |
877c2bbe474b182980cd3e9c274790fc68a90563586d98534fc79e68b9e53f9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|
Release files / bot_ui_kitty-0.1.5-py3-none-any.whl
| Download URL | bot_ui_kitty-0.1.5-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd97e1473a10231c8f1182a41805a037f0f15a42183099217bbb42a75fa1a747
|
|
BLAKE2b-256 checksum How to use checksums |
edb9b04a1a7f17e31835ab1f0aec537e8292a782a289a5b46eab527b1436a72b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|
Security for bot-ui-kitty 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.