1.9 KiB
1.9 KiB
Custom instructions for GitHub Copilot
Whenever generating code, commit messages, or explanations related to Discord.js or the Discord API:
-
Always consult and reference the following sources for accurate and up-to-date information:
-
Always prefer official documentation over blogs, forums, or tutorials.
- If no clear answer is found in docs, inspect the installed dependency in
node_modulesto confirm if a method, property, or class truly exists.
- If no clear answer is found in docs, inspect the installed dependency in
-
When suggesting code, ensure it matches the latest stable release of Discord.js and related packages (June 2025 or newer).
- If examples belong to an older version, adapt them to the most recent stable release.
- If uncertain, indicate that verification against the
node_modulesimplementation is required.
-
When installing or suggesting npm packages related to Discord.js:
- Verify against their GitHub repository for recent updates, breaking changes, or migration notes.
- Always check if the changelog or releases page contains updates after June 2025 and adjust suggestions accordingly.
-
Always provide links to relevant official documentation (Discord.js Guide, GitHub repos, or Discord Developer Docs).
- If the info is missing in docs, but exists in the actual installed package, explain that and provide the discovered usage.
-
Error validation requirement:
- After generating or modifying code, always remind the user to check for TypeScript errors by running:
(or equivalent
npx tsc --noEmittsccommand). - If type errors are found, propose fixes before finalizing the solution.
- After generating or modifying code, always remind the user to check for TypeScript errors by running: