Skip to main content

Manage Discord Slash Commands

Project description

ukosnik

ukosnik is a Python CLI to manage Discord Slash Commands.

Insert/update demo output

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ukosnik-0.1.3.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ukosnik-0.1.3-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file ukosnik-0.1.3.tar.gz.

File metadata

  • Download URL: ukosnik-0.1.3.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

Hashes for ukosnik-0.1.3.tar.gz
Algorithm Hash digest
SHA256 30d177ed0f34de866f6ab06fe8c9a2d0cfee4b2c3f69dfcbccf65a2499b2682e
MD5 6441102d7e04924f3d8c682b0e712781
BLAKE2b-256 09156f7838b1a46805851bc12f77d1c8f5d5a4b47599f22014bfa703c8a44b26

See more details on using hashes here.

File details

Details for the file ukosnik-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: ukosnik-0.1.3-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

Hashes for ukosnik-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3430842d9e4bcf453f3685129ef7d1fd72fe6b04a827326d5a794f66e8d28a89
MD5 501f89b87898080e174bb0a2f048e19f
BLAKE2b-256 b4e41be870074f96229e8c0aff149d3649178cfda48e7bda308f55de375c3db0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page