~komidore64/dcomm

Manage Discord application commands from the command line

7e89b44 wip - use lib_discord 0.1.1

11 months ago

df5864e wip

11 months ago

#dcomm

Manage Discord application commands from the command line.

project -- sources -- mailing lists -- bug tracker

builds.sr.ht status Gem Version

#Installation

dcomm requires an installed Ruby runtime >= 3.2.

Install the gem and add to the application's Gemfile by executing:

bundle add dcomm

If bundler is not being used to manage dependencies, install the gem by executing:

gem install dcomm

#Configuration

You will need your Discord application's Bot Token.

dcomm looks for a bot token in three locations (listed below, in order of precedence) before giving up with an error.

  1. DISCORD_BOT_TOKEN environment variable, if it exists
  2. attempts to read the value from a config file $XDG_CONFIG_HOME/dcomm/config.yml, if it exists
  3. attempts to read the value from a config file $HOME/.config/dcomm/config.yml, if it exists

Create the config file in your desired location from the list above. Add your bot token.

---

discord_bot_token: MY_FANCY_BOT_TOKEN

#Usage

dcomm provides the following commands for communicating with Discord's API to manipulate application commands.

Refer to Discord's documentation for constructing command objects.

#Global commands

dcomm apply APP_ID COMMANDS_FILE                                  # Bulk overwrite one or more global application commands
dcomm create APP_ID COMMAND_FILE                                  # Create a global application command
dcomm delete APP_ID COMMAND_ID                                    # Delete a global application command
dcomm list APP_ID                                                 # List global application commands
dcomm show APP_ID COMMAND_ID                                      # View details of a global application command
dcomm update APP_ID COMMAND_ID COMMAND_FILE                       # Update a global application command

#Guild commands

dcomm guild apply APP_ID GUILD_ID COMMANDS_FILE                   # Bulk overwrite one or more guild application commands
dcomm guild create APP_ID GUILD_ID COMMAND_FILE                   # Create a guild application command
dcomm guild delete APP_ID GUILD_ID COMMAND_ID                     # Delete a guild application command
dcomm guild list APP_ID GUILD_ID                                  # List guild application commands
dcomm guild show APP_ID GUILD_ID COMMAND_ID                       # View details of a guild application command
dcomm guild update APP_ID GUILD_ID COMMAND_ID COMMAND_FILE        # Update a guild application command

#Misc

dcomm version                                                     # DComm version info

#Getting help

Please use the mailing lists if you have questions or need help.

#Contributing

Bug reports and patch submissions are welcome on SourceHut via the bug tracker and mailing lists, respectively. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

#Code style

This project adheres to standardrb style rules.

Additionally, we strive for an 80 character line length, but it's not a hard-and-fast rule. As such, there is no tool to enforce it. There are occasions where breaking an expression across multiple lines decreases readability for no benefit other than to appease a linter.

#Code of Conduct

Everyone interacting in the dcomm project's codebases, bug trackers, chat rooms, and mailing lists is expected to follow the code of conduct.

#Licenses

See files in the LICENSES directory.