Get started with Peachy now 🍑
PEACHYPEACHY
Utility

Quote

The `quote` command sends a random motivational or general quote in a Discord server. It can be triggered using the prefixes `P`, `p`, or the slash command `/`.

Quote Command

The quote command is a fun feature in a Discord bot that sends a random motivational or general quote to the user.

Command Details

  • Name: quote
  • Aliases: q, ran, quote
  • Category: Fun
  • Description: Sends a random quote (motivational or general).
  • Usage:
    • Prefix: P quote, p quote
    • Slash: /quote
  • Examples:
    • P quote
    • p quote
    • /quote
  • Cooldown: 5 seconds
  • Arguments: None
  • Slash Command: Enabled
  • Permissions:
    • Bot: SendMessages, ViewChannel, EmbedLinks
    • User: None
  • Player Requirements: None (no voice, DJ, or active player required)

Functionality

  • Sends a randomly selected quote from a predefined list of motivational and general quotes.
  • Sends an initial "searching" message with a loading emoji, then replaces it with an embed containing:
    • The random quote prefixed with a scroll emoji (📜).
    • A title with customizable emojis.
    • A footer showing the requester's display name and avatar.
    • A timestamp.
  • Supports both prefix-based (P or p) and slash command (/) inputs.

Code Overview

The command is built using a Command class structure and handles both message-based and interaction-based (slash command) inputs. It uses:

  • client.embed() to create a formatted embed.
  • A predefined array of motivational and general quotes, with a random selection using Math.random().
  • Language localization for messages and emojis.
  • No external data queries or error handling beyond the initial message deferral.