EDA.API.Stage (EDA v0.3.0)

Copy Markdown View Source

REST API endpoints for Discord stage instances.

All functions return {:ok, result} or {:error, reason}.

Summary

Functions

Creates a stage instance.

Deletes a stage instance by channel ID.

Gets a stage instance by channel ID.

Modifies a stage instance.

Functions

create(params)

@spec create(map()) :: {:ok, map()} | {:error, term()}

Creates a stage instance.

Parameters (map)

  • :channel_id - The stage channel ID (required)
  • :topic - The topic of the stage instance (required, 1-120 chars)
  • :privacy_level - Privacy level (currently only 2 for GUILD_ONLY)
  • :send_start_notification - Notify @everyone that a stage instance has started
  • :guild_scheduled_event_id - Associated scheduled event ID

delete(channel_id)

@spec delete(String.t() | integer()) :: :ok | {:error, term()}

Deletes a stage instance by channel ID.

get(channel_id)

@spec get(String.t() | integer()) :: {:ok, map()} | {:error, term()}

Gets a stage instance by channel ID.

modify(channel_id, params)

@spec modify(String.t() | integer(), map()) :: {:ok, map()} | {:error, term()}

Modifies a stage instance.