Commands
URL
Documentation for the /url command to manipulate URLs
/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
Options
Option | Description | Required | Platform |
---|---|---|---|
input | The URL to encode | Yes | Discord (parameter), Slack (directly after action) |
Example
/url encode-component
Fully encodes a string for use in a URL (encodes ALL special characters).
Usage
Options
Option | Description | Required | Platform |
---|---|---|---|
input | The string to fully encode | Yes | Discord (parameter), Slack (directly after action) |
Example
/url decode
Decodes a URL or URL-encoded string.
Usage
Options
Option | Description | Required | Platform |
---|---|---|---|
input | The encoded URL to decode | Yes | Discord (parameter), Slack (directly after action) |
Example
/url parse
Parses a URL and displays its components.
Usage
Options
Option | Description | Required | Platform |
---|---|---|---|
input | The URL to parse | Yes | Discord (parameter), Slack (directly after action) |
Example
/url validate
Checks if a URL is valid.
Usage
Options
Option | Description | Required | Platform |
---|---|---|---|
input | The URL to validate | Yes | Discord (parameter), Slack (directly after action) |
Example
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
andencode-component
is important for preserving URL structure - URL parsing provides detailed information about each component in the URL