EDA.API.User (EDA v0.3.0)

Copy Markdown View Source

REST API endpoints for Discord users.

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

Summary

Functions

Creates a DM channel with a user.

Gets a user by ID.

Gets the current bot user.

Modifies the current bot user.

Functions

create_dm(user_id)

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

Creates a DM channel with a user.

get(user_id)

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

Gets a user by ID.

me()

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

Gets the current bot user.

modify_me(opts)

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

Modifies the current bot user.