Economy
Peach
The `peach` command allows users to earn coins and experience points by being "peachy" in a Discord server. It can be triggered using the prefixes `P`, `p`, or the slash command `/`.
Command Details
- Name: peach
- Aliases: each, p
- Category: Economy
- Description: Earn some coins and experience points by being peach.
- Usage:
P peach
,p peach
, or/peach
- Examples:
P peach
p peach
/peach
- Cooldown: 5 seconds (with a 5-minute cooldown between claims)
- Arguments: None
- Slash Command: Enabled
- Permissions:
- Bot: SendMessages, ViewChannel, EmbedLinks
- User: None
- Player Requirements: None (no voice, DJ, or active player required)
Functionality
- Awards a random amount of coins (400–500) and experience points (5–10) per use.
- Verified users receive a 40% bonus on coins and XP.
- Checks for a 5-minute cooldown between claims. If the cooldown is active, displays the remaining time (minutes, seconds).
- Updates user balance, XP, and peachy streak using direct database updates via the
Users
schema. - Displays an embed with:
- A title with customizable emojis.
- The earned coins and XP, including any bonus for verified users.
- A footer with the requester's display name and avatar.
- Tracks the user's peachy streak (
peachy.streak
) in the database. - Handles errors (e.g., user not found) 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.getUser
to fetch user data from the database.chance
library to generate random coin and XP amounts.moment
for handling cooldown duration calculations.- Direct
Users
schema updates for balance, XP, and peachy streak. client.utils.checkCooldown
andclient.utils.updateCooldown
for cooldown management.client.embed()
to create a formatted embed with dynamic emojis.- Language localization for messages and emojis.
- Error handling for user fetch failures or other issues.
Weekly
The `weekly` command allows users to earn coins and experience points weekly in a Discord server. It can be triggered using the prefixes `P`, `p`, or the slash command `/`.
Goma
The `goma` command allows users to earn coins and experience points by being "goma" in a Discord server. It can be triggered using the prefixes `P`, `p`, or the slash command `/`.