Guild bans.
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
Functions
Bans up to 200 users at once. Returns the ids Discord banned and those it couldn't, or that were already banned; Discord answers an error when it could ban none.
Bans a user. Pass delete_message_seconds: to also delete their recent messages.
Lifts a user's ban.
Fetches the ban for a user.
Lists a guild's bans.
Functions
@spec bulk_create(Lingo.Api.id(), [Lingo.Api.id()], keyword()) :: Lingo.Api.result(%{ banned_users: [Lingo.Api.id()], failed_users: [Lingo.Api.id()] })
Bans up to 200 users at once. Returns the ids Discord banned and those it couldn't, or that were already banned; Discord answers an error when it could ban none.
@spec create(Lingo.Api.id(), Lingo.Api.id(), keyword()) :: Lingo.Api.result()
Bans a user. Pass delete_message_seconds: to also delete their recent messages.
@spec delete(Lingo.Api.id(), Lingo.Api.id(), keyword()) :: Lingo.Api.result()
Lifts a user's ban.
@spec get(Lingo.Api.id(), Lingo.Api.id()) :: Lingo.Api.result(Lingo.Type.Ban.t())
Fetches the ban for a user.
@spec list( Lingo.Api.id(), keyword() ) :: Lingo.Api.result([Lingo.Type.Ban.t()])
Lists a guild's bans.