Threads and forum posts.
Every function returns {:ok, result}, :ok when Discord sends no body, or
{:error, %Lingo.Error{}}. Calls go to the current bot (see Lingo.with_bot/2).
Summary
Types
A guild's active threads, with the bot's membership in those it has joined.
A page of archived threads, with the bot's membership in those it has joined.
Functions
Adds a member to a thread.
Fetches a thread member. with_member: true includes the guild member.
Adds the bot to a thread.
Removes the bot from a thread.
Lists a guild's active threads, with the bot's membership in those it has joined.
Lists archived private threads the bot has joined. Options: :before and :limit.
Lists a thread's members. Options: :with_member (include the guild
members), :after and :limit.
Lists a channel's archived private threads. Options: :before and :limit.
Lists a channel's archived public threads. Options: :before and :limit.
Removes a member from a thread.
Starts a thread from a message.
Starts a thread without a message, or a forum post.
Types
@type active() :: %{ threads: [Lingo.Type.Channel.t()], members: [Lingo.Type.ThreadMember.t()] }
A guild's active threads, with the bot's membership in those it has joined.
@type archived() :: %{ threads: [Lingo.Type.Channel.t()], members: [Lingo.Type.ThreadMember.t()], has_more: boolean() }
A page of archived threads, with the bot's membership in those it has joined.
Functions
@spec add_member(Lingo.Api.id(), Lingo.Api.id()) :: Lingo.Api.result()
Adds a member to a thread.
@spec get_member(Lingo.Api.id(), Lingo.Api.id(), keyword()) :: Lingo.Api.result(Lingo.Type.ThreadMember.t())
Fetches a thread member. with_member: true includes the guild member.
@spec join(Lingo.Api.id()) :: Lingo.Api.result()
Adds the bot to a thread.
@spec leave(Lingo.Api.id()) :: Lingo.Api.result()
Removes the bot from a thread.
@spec list_active(Lingo.Api.id()) :: Lingo.Api.result(active())
Lists a guild's active threads, with the bot's membership in those it has joined.
@spec list_joined_private_archived( Lingo.Api.id(), keyword() ) :: Lingo.Api.result(archived())
Lists archived private threads the bot has joined. Options: :before and :limit.
@spec list_members( Lingo.Api.id(), keyword() ) :: Lingo.Api.result([Lingo.Type.ThreadMember.t()])
Lists a thread's members. Options: :with_member (include the guild
members), :after and :limit.
@spec list_private_archived( Lingo.Api.id(), keyword() ) :: Lingo.Api.result(archived())
Lists a channel's archived private threads. Options: :before and :limit.
@spec list_public_archived( Lingo.Api.id(), keyword() ) :: Lingo.Api.result(archived())
Lists a channel's archived public threads. Options: :before and :limit.
@spec remove_member(Lingo.Api.id(), Lingo.Api.id()) :: Lingo.Api.result()
Removes a member from a thread.
@spec start_from_message( Lingo.Api.id(), Lingo.Api.id(), Lingo.Api.params(), keyword() ) :: Lingo.Api.result(Lingo.Type.Channel.t())
Starts a thread from a message.
@spec start_without_message(Lingo.Api.id(), Lingo.Api.params(), keyword()) :: Lingo.Api.result(Lingo.Type.Channel.t())
Starts a thread without a message, or a forum post.