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
Hashes for discord_ext_ui-3.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 174573d3355104412157d416441c06c098474f8c705df1de3976eb65ce7d8d5c |
|
MD5 | c56562cdada4ba2f5df4894bf721c171 |
|
BLAKE2b-256 | 121a12c1be45670ba9b2204a4c314d37336d166a3fd29593311c5863b4c344b8 |