An Declarative UI Kit for discord.py or pycord
Project description
This package is an extension of discord.ui.
You can use pycord or discord.py.
I hate pycord’s slash command system.
why use discord-ext-ui?
discord-ext-ui comes with a declarative View system and Combine system similar to SwiftUI.
This makes it easier to implement architectures such as MVVM and to edit buttons after they have been submitted.
Advantages of adopting discord-ext-ui
no more need to explicitly update the message
As an example, let’s say you want to implement a function that allows you to increase or decrease the count using a button.
If you want to implement it without using MVVM, you need to explicitly write a process to update the message to reflect the change in the internal state when the button is pressed.
On the other hand, discord-ext-ui provides wrappers for variables such as state and published. By using this wrapper, it is not necessary to explicitly write message updates according to changes in member variables.
Also, since the function to be executed when the button is pressed can be set declaratively, it is possible to perform complex processing such as for loops. 2.
easy to write when a button is used
With discord-ext-ui, it is possible to change buttons when updating automatically, so it is easy to implement disabling/enabling according to instance variable values and changing buttons according to internal states such as pagination.
Example
See ./examples/.
LICENSE
MIT
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 discord-ext-ui-3.1.9.tar.gz
.
File metadata
- Download URL: discord-ext-ui-3.1.9.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20d52f3c06df10f50810b0d889f7e30e84fc2a074da7f70bb37e63483390767a |
|
MD5 | c698e8fb6b97aa18b20655a4bac3039c |
|
BLAKE2b-256 | 2557e4a459137f55f86c506f600c058bf6dbd2449c32f6fc080f8fe339b8ac56 |
File details
Details for the file discord_ext_ui-3.1.9-py3-none-any.whl
.
File metadata
- Download URL: discord_ext_ui-3.1.9-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04070aa2d9a8588bc75ebea29ebdf25d0d46bbe05391d86d7563cd5e15d418e7 |
|
MD5 | 05fe01ba7e599f939ab41e2fc28aed93 |
|
BLAKE2b-256 | fd682b775f8616e2b3225f8a0a5d4c49462b6b334342064f3bdabc6e48c9b064 |