discord-api-types

website·Indexed 33 days ago

https://discord-api-types.dev/

TypeScript type definitions for the Discord API, including REST and RPC interfaces. Version 0.38.55 provides comprehensive types for API resources such as guilds, channels, users, and webhooks, as well as RPC activity and invite data.

Tokens
541.2K
Snippets
2.9K
Records
5.1K
Agent score
56%

What's inside discord-api-types

  1. Overview of discord-api-types

    discord-api-types is a module designed to help developers work with data returned from the Discord API. It provides type definitions that allow developers to work with raw API data while ensuring that the accessed properties exist and are of the correct type.
  2. Use the APIStageInstance interface

    The APIStageInstance interface represents a stage instance object in Discord. It contains metadata about the stage session, including its association with a guild and channel, its privacy settings, and the current topic.
    interface APIStageInstance {
      id: string;
      channel_id: string;
      guild_id: string;
      topic: string;
      privacy_level: StageInstancePrivacyLevel;
      guild_scheduled_event_id?: string;
      discoverable_disabled: boolean; // @deprecated
    }
  3. Define a Text Input Component for Discord Modals

    The APITextInputComponent is an interactive component used exclusively within modals to allow users to enter free-form text. It supports both single-line and multi-line paragraph inputs. When defining this component, you specify attributes to customize behavior and appearance, though not all attributes are returned in the interaction payload.
  4. Use the APIGuildIntegrationApplication interface

    The APIGuildIntegrationApplication interface represents an application integrated into a Discord guild. It contains basic metadata about the application, including its identity, naming, and associated bot user.
    interface APIGuildIntegrationApplication {
      id: string;
      name: string;
      description: string;
      icon: string | null;
      bot?: APIUser;
    }