/qrcode Command

The /qrcode command provides tools to generate and decode QR codes.

Available Subcommands

  • /qrcode generate - Generate a QR code from text or URL
  • /qrcode decode - Decode a QR code from an image

Usage

Generate QR Code

/qrcode generate content:<text or URL> [size:<size>]

Options

OptionDescriptionRequiredPlatform
contentThe text or URL to encode in the QR codeYesDiscord (parameter), Slack (flag with —content)
sizeThe size of the QR code in pixels (128-1024)No (default: 256)Discord (parameter), Slack (flag with —size)

Example

/qrcode generate content:https://google.fr size:512

This command will generate a 512x512 pixel QR code containing the URL “https://google.fr” as shown below:

Decode QR Code

/qrcode decode image:<file>

Options

OptionDescriptionRequiredPlatform
imageThe image containing the QR code to decodeYesDiscord only
urlURL to an image containing a QR code to decodeYesSlack only

For Discord, attach an image containing a QR code, and the command will return the encoded text or URL.

For Slack, provide a URL to a publicly accessible image containing a QR code.

If the decoded content is a URL, it will be identified as such.

Platform-Specific Implementation

Discord Implementation

  • Uses Discord’s named parameter system (e.g., content:, size:)
  • For decode, uses Discord’s file attachment system
  • Response appears as an embedded message with the QR code as an attachment
  • For decode, users directly attach images to the command

Slack Implementation

  • Uses Slack’s flag-based approach with --flag value syntax
  • For generate, outputs the QR code as an image file in the channel
  • For decode, requires a URL to a publicly accessible image (due to Slack API limitations)
  • Response appears as a formatted message with blocks in Slack

Example Use Cases

Example 1: Generate a QR code for a website

/qrcode generate content:https://discord.com

Example 2: Generate a QR code for text

/qrcode generate content:This is a secret message

Example 3: Generate a QR code with custom size

/qrcode generate content:https://github.com size:300

Example 4: Decode a QR code

/qrcode decode image:<attach an image containing a QR code>

Features

  • Quickly generate QR codes from any text or URL
  • Decode QR codes from images
  • Customize the size of generated QR codes
  • Automatic URL detection in decoded content

Notes

  • Larger QR codes are easier to scan but take up more space
  • For optimal scanning, ensure the QR code has good contrast and is not distorted
  • QR codes can contain text, URLs, contact information, and more
  • For Slack decode, the image URL must be publicly accessible

Limitations

  • Minimum size: 128 pixels

  • Maximum size: 1024 pixels

  • Content cannot be empty

  • In Slack, decode requires a URL rather than a direct file upload due to API limitations