/url Command

The /url command provides tools to manipulate URLs.

Available Subcommands

/url encode

Encodes a URL (preserving the URL structure like / in paths).

Usage

/url encode input: <URL>

Options

OptionDescriptionRequiredPlatform
inputThe URL to encodeYesDiscord (parameter), Slack (directly after action)

Example

/url encode input: https://example.com/path?query=value with space

/url encode-component

Fully encodes a string for use in a URL (encodes ALL special characters).

Usage

/url encode-component input: <string>

Options

OptionDescriptionRequiredPlatform
inputThe string to fully encodeYesDiscord (parameter), Slack (directly after action)

Example

/url encode-component input: value with/and&characters?special

/url decode

Decodes a URL or URL-encoded string.

Usage

/url decode input: <encoded URL>

Options

OptionDescriptionRequiredPlatform
inputThe encoded URL to decodeYesDiscord (parameter), Slack (directly after action)

Example

/url decode input: https://example.com/path?query=value%20with%20space

/url parse

Parses a URL and displays its components.

Usage

/url parse input: <URL>

Options

OptionDescriptionRequiredPlatform
inputThe URL to parseYesDiscord (parameter), Slack (directly after action)

Example

/url parse input: https://user:pass@example.com:8080/path?query=value#fragment

/url validate

Checks if a URL is valid.

Usage

/url validate input: <URL>

Options

OptionDescriptionRequiredPlatform
inputThe URL to validateYesDiscord (parameter), Slack (directly after action)

Example

/url validate input: https://example.com

Platform-Specific Implementation

Discord Implementation

  • Commands use Discord’s subcommand system with named parameters (e.g., input:)
  • Responses appear as embeds in the channel where the command is invoked
  • Results are formatted neatly with syntax highlighting where appropriate

Slack Implementation

  • Commands use a simpler format where input follows directly after the action
  • Responses are shown with formatted blocks clearly showing inputs and outputs
  • Validation errors are displayed with helpful error messages
  • The command supports help functionality by simply typing /url

Use Cases

  • Encode URLs containing special characters
  • Decode URLs to make them readable
  • Parse the structure of a complex URL
  • Validate a URL before using it in an application
  • Transform user input into URL-safe formats

Notes

  • The difference between encode and encode-component is important for preserving URL structure
  • URL parsing provides detailed information about each component in the URL