Files
amayo/.github/copilot-instructions.md

1.8 KiB

Custom instructions for GitHub Copilot (discord.js 15.0.0-dev)

When generating or modifying code for Discord.js version 15.0.0-dev.1759363313-f510b5ffa:

  1. Primary Source of Truth

    • Do not assume the official docs, guide, or GitHub repositories are fully up-to-date.
    • Always prioritize the installed package in node_modules/discord.js as the most reliable source.
    • Always cross-reference with the provided file example.ts.txt to understand new or experimental APIs.
  2. Secondary Sources

  3. Code Analysis

    • Inspect the type definitions and source files inside node_modules/discord.js before suggesting new methods or classes.
    • If example.ts.txt shows usage not covered in documentation, assume that is the intended API for this development version.
  4. Validation

    • Always suggest running:
      npx tsc --noEmit
      
      to validate typings.
    • Remind to check runtime memory and CPU usage with:
      console.log(process.memoryUsage());
      
      and external profilers if needed.
  5. Communication

    • When suggesting code, state explicitly whether it comes from:
      • node_modules (preferred, authoritative)
      • example.ts.txt (author-provided experimental reference)
      • official docs (secondary, possibly outdated)