Emote
Laugh
The `laugh` command allows users to express a laughing emotion with a random laugh emoji in a Discord server. It can be triggered using the prefixes `P`, `p`, or the slash command `/`.
Command Details
- Name: laugh
- Aliases: None
- Category: Emotes
- Description: Express a feeling of laughter with a random laugh emoji.
- Usage:
P laugh
,p laugh
, or/laugh
- Examples:
P laugh
p laugh
/laugh
- Cooldown: 3 seconds
- Arguments: None
- Slash Command: Enabled
- Permissions:
- Bot: SendMessages, ViewChannel, EmbedLinks
- User: None
- Player Requirements: None (no voice, DJ, or active player required)
Functionality
- Selects a random laugh emoji from a predefined list (
emoji.emotes.laugh
orglobalEmoji.emotes.laugh
). - Displays an embed with:
- A title with customizable emojis.
- A description mentioning the user's display name expressing laughter.
- The selected laugh emoji as an image.
- A footer with the requester's display name and avatar.
- Supports both prefix-based (
P
orp
) and slash command (/
) inputs. - Handles errors (e.g., issues with emoji retrieval or message sending) with a custom error message.
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.utils.getRandomElement
to select a random laugh emoji.client.embed()
to create a formatted embed with dynamic emojis and images.client.utils.emojiToImage
to convert the selected emoji into an image for the embed.- Language localization for messages and emojis.
- Error handling for unexpected issues during execution.
Happy
The `happy` command allows users to express a happy emotion with a random happy emoji in a Discord server. It can be triggered using the prefixes `P`, `p`, or the slash command `/`.
Makeup
The `makeup` command allows users to show off a makeup-themed expression with a random makeup emoji in a Discord server. It can be triggered using the prefixes `P`, `p`, or the slash command `/`.