Manage Discord Slash Commands
Project description
ukosnik
ukosnik is a Python CLI to manage Discord Slash Commands.
Installation
Python 3.6 or higher is required
Run the command python3 -m pip install -U ukosnik to install the CLI.
You may alternatively clone the repository and install the package from local sources.
Usage
The following examples assume the environment variable DISCORD_TOKEN to be set.
Register/update slash commands:
# Register/update commands
ukosnik update config_file.yml
# Same but delete oudated commands
ukosnik update config_file.yml -d
# Register/update guild commands
# (very useful for testing since cache updates instantly)
ukosnik update config_file.yml --guild GUILD_ID
Please note that updating application commands may take up to 1 hour to refresh, this is an expected Discord behavior.
Read more about it here.
To debug commands, it's recommended to use the --guild argument since guild commands update instantly, unlike application-scoped commands.
Note: Providing multiple configuration files to merge is not supported yet but is planned.
Clear all commands:
# Clear all application commands
ukosnik clear
# Clear all commands from a guild
ukosnik clear --guild GUILD_ID
⚠️ No confirmation will be prompted before deleting commands.
Configuration
Configuration documents are pretty straighforward. They can be either a yml or json file.
For now, the only available field in a configuration document is commands. You may provide either an object of commands with the command name as key or a simple list.
To get a better understanding of how you can register commands, take a look at the examples.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ukosnik-0.1.2.tar.gz.
File metadata
- Download URL: ukosnik-0.1.2.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01bc7c1aceea2dc5ef410eea78c09622ca6f6a5fadfc7a4487cabdf755dc572e
|
|
| MD5 |
49939092f6fc933f4f58a37020c01999
|
|
| BLAKE2b-256 |
8a574454a55f128eb2e2130703a29205f2685c3b5c3520731d06f3a25bfed598
|
File details
Details for the file ukosnik-0.1.2-py3-none-any.whl.
File metadata
- Download URL: ukosnik-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1075db7f6ca7d393967ee0025235f433fd0ad96a855c2b2bbcf54676b56e984f
|
|
| MD5 |
fe662116049e481cd8cdccfdbb8f04dc
|
|
| BLAKE2b-256 |
a50acdefdb81910a82e63abd463244580c07ef4bf861346edeb65f87eda2199f
|