Fun
Quote
The `quote` command sends a random motivational or general quote in a Discord server. It can be triggered using the slash command `/` or prefix commands.
Command Details
- Name: quote
- Aliases: q, ran, quote
- Category: Fun
- Description: Displays a random quote (motivational or general).
- Usage:
P quote
,p quote
, or/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 an initial "searching" message with a loading emoji for better UX.
- Selects a random quote from a predefined list of general and motivational quotes (e.g., from Albert Einstein, Walt Disney, Maya Angelou).
- Displays the quote in an embed with:
- A formatted title using localized emojis.
- The quote prefixed with a ๐ emoji.
- A footer with the requesterโs display name and avatar.
- A timestamp.
- Supports both prefix-based (
P
orp
) and slash command (/
) inputs. - No user input validation is required, as the command takes no arguments.
Code Overview
The command is built using a Command
class structure and handles both message-based and interaction-based inputs. It uses:
client.embed()
to create a formatted embed for the quote display.- A predefined array of quotes, combining general and motivational themes.
- Language localization for messages and emojis (via
language.locales
andglobalEmoji
). - Random selection of quotes using
Math.random()
. - No external dependencies or database queries, ensuring lightweight execution.
Guess Number
The `guessnumber` command allows users to play a number-guessing game in a Discord server, attempting to guess a number between 1 and 100. It can be triggered using the slash command `/` or prefix commands.
Wallpaper
The `wallpaper` command allows users to browse and view wallpapers for PC or phone in a Discord server. It can be triggered using the slash command `/` or prefix commands.