Noizu.Discord.Guilds (Noizu.Discord v0.1.0)

Copy Markdown View Source

Guild endpoints (and the bot's guild list).

Summary

Functions

GET /guilds/{guild.id}/channels — the guild's channels (threads excluded).

GET /guilds/{guild.id} — a guild. Query opts: :with_counts.

GET /users/@me/guilds — one page of the bot's guilds. Query opts: :before, :after, :limit (1–200), :with_counts.

GET /users/@me/guilds — lazy stream over all of the bot's guilds (after paging). Opts: :limit (page size, default 200), :after, :with_counts.

GET /guilds/{guild.id}/members — one page of members (requires the GUILD_MEMBERS privileged intent). Query opts: :limit (1–1000), :after (user id).

GET /guilds/{guild.id}/members — lazy stream over all members, paging with after = largest user.id. Opts: :limit (page size, default 1000), :after (start cursor).

Functions

channels(client, guild_id, opts \\ [])

GET /guilds/{guild.id}/channels — the guild's channels (threads excluded).

get(client, guild_id, opts \\ [])

GET /guilds/{guild.id} — a guild. Query opts: :with_counts.

me(client, opts \\ [])

GET /users/@me/guilds — one page of the bot's guilds. Query opts: :before, :after, :limit (1–200), :with_counts.

me_stream(client, opts \\ [])

@spec me_stream(Noizu.Discord.Client.t(), keyword()) :: Enumerable.t()

GET /users/@me/guilds — lazy stream over all of the bot's guilds (after paging). Opts: :limit (page size, default 200), :after, :with_counts.

members(client, guild_id, opts \\ [])

GET /guilds/{guild.id}/members — one page of members (requires the GUILD_MEMBERS privileged intent). Query opts: :limit (1–1000), :after (user id).

members_stream(client, guild_id, opts \\ [])

@spec members_stream(Noizu.Discord.Client.t(), String.t(), keyword()) ::
  Enumerable.t()

GET /guilds/{guild.id}/members — lazy stream over all members, paging with after = largest user.id. Opts: :limit (page size, default 1000), :after (start cursor).