Get started with Peachy now 🍑
PEACHYPEACHY
Company

Apply Job List

The `applyjoblist` command lists all users with pending job applications grouped by job position. This command is intended for staff or developers only.

Command Details

  • Name: applyjoblist
  • Aliases: ajl
  • Category: Company
  • Description: List all users with pending job applications grouped by position.
  • Usage: applyjoblist
  • Examples:
    • applyjoblist
  • Cooldown: 3 seconds
  • Arguments: None
  • Slash Command: Disabled
  • Permissions:
    • Bot: SendMessages, ViewChannel, EmbedLinks
    • User: Developer or Staff only
  • Player Requirements: None

Functionality

  • Retrieves all users with a pending job application (work.status = "awaiting") from the database.
  • Groups users by job position (e.g., IT, HR, etc.).
  • Displays each group in a paginated embed format, 10 users per page.
  • Each user entry includes:
    • ID
    • Username
    • Applied Date (formatted as local date)
  • Utilizes reaction-based pagination for navigation between pages.

Code Overview

The command:

  • Extends the Command class.
  • Imports the User schema from ../../schemas/user.
  • Queries the database using:
    User.find({ "work.status": "awaiting" });