RuleMembers

discord-api Best Practices

discord-api Best Practices is a rule file for Cursor, from the Cursor rules (mdc) collection by sanjeed5. The full text is about 978 words in 9 sections, with 18 code blocks. A rule file tells the editor's AI how code in this stack should be written, so its suggestions follow the same conventions.

It is most useful for people working in Backend and Product and engineering who use Cursor.

What it covers

  • 1. API Interaction: REST First, Gateway for Events
  • 2. Strong Typing with discord-api-types
  • 3. Rate Limit Handling: Exponential Back-off
  • 4. Secure Token Management
  • 5. Gateway Intents: Request Only What's Needed
  • 6. Modern UI: Slash Commands & Message Components
  • 7. Code Organization: Modular and Testable
  • 8. Data Storage: Use Databases
  • 9. Game SDK & Rich Presence: Modern Approach

The full text is in the members library

Book a call and we will give you access to the full Cursor library: every entry in full, search by meaning, copy and download.

Source: https://github.com/sanjeed5/awesome-cursor-rules-mdc/blob/main/rules-mdc/discord-api.mdc

Author: sanjeed5, Cursor rules (mdc). License: CC0-1.0.

Related entries