libduvet/http/methods

Types

Which of the user’s profile images to set.

pub type ProfileImageKind {
  Avatar
  Banner
}

Constructors

  • Avatar
  • Banner

What sending a message may set beyond its content.

pub type SendMessageOptions(a) {
  SendMessageOptions(
    nonce: option.Option(String),
    message_reference: option.Option(message.MessageReference),
    allowed_mentions: option.Option(message.AllowedMentions),
    files: List(multipart.FilePart),
    embeds: List(embed.Embed),
    sticker_attachment_id: option.Option(String),
    on_progress: option.Option(fn(Int, Int) -> Nil),
    abort: option.Option(process.Subject(a)),
  )
}

Constructors

Values

pub fn accept_friend_request(
  client: client.RestClient,
  request_id: String,
) -> Result(conversation.Friend, error.DuvetError)
pub fn accept_team_invite(
  client: client.RestClient,
  invite_id: String,
) -> Result(Nil, error.DuvetError)
pub fn activate_my_bucket(
  client: client.RestClient,
  id: String,
) -> Result(Nil, error.DuvetError)
pub fn activate_space_bucket(
  client: client.RestClient,
  space_id: String,
  bucket_id: String,
) -> Result(Nil, error.DuvetError)
pub fn add_bot_to_space(
  client: client.RestClient,
  space_id: String,
  bot_user_id: String,
) -> Result(Nil, error.DuvetError)
pub fn add_conversation_member(
  client: client.RestClient,
  conversation_id: String,
  user_id: String,
) -> Result(conversation.ConversationMember, error.DuvetError)
pub fn add_conversation_reaction(
  client: client.RestClient,
  conv_id: String,
  message_id: String,
  emoji_name: String,
  emoji_id emoji_id: option.Option(String),
) -> Result(Nil, error.DuvetError)
pub fn add_room_reaction(
  client: client.RestClient,
  room_id: String,
  message_id: String,
  emoji_name: String,
  emoji_id emoji_id: option.Option(String),
) -> Result(Nil, error.DuvetError)
pub fn assign_role_to_member(
  client: client.RestClient,
  space_id: String,
  role_id: String,
  member_id: String,
) -> Result(Nil, error.DuvetError)
pub fn change_email(
  client: client.RestClient,
  token: String,
  email: String,
) -> Result(Nil, error.DuvetError)
pub fn create_application(
  client: client.RestClient,
  team_id: String,
  name: String,
  description description: option.Option(String),
) -> Result(rest.Application, error.DuvetError)
pub fn create_bot(
  client: client.RestClient,
  team_id: String,
  app_id: String,
) -> Result(String, error.DuvetError)

Makes the application’s bot; answers its token.

pub fn create_dm(
  client: client.RestClient,
  user_id: String,
) -> Result(conversation.Conversation, error.DuvetError)
pub fn create_emoji(
  client: client.RestClient,
  space_id: String,
  name: String,
  file: multipart.FilePart,
  on_progress on_progress: option.Option(fn(Int, Int) -> Nil),
) -> Result(space.SpaceEmoji, error.DuvetError)
pub fn create_group(
  client: client.RestClient,
  name: String,
  user_ids: List(String),
) -> Result(conversation.Conversation, error.DuvetError)
pub fn create_role(
  client: client.RestClient,
  space_id: String,
  name: String,
  permissions permissions: option.Option(Int),
  color_from color_from: option.Option(Int),
  color_via color_via: option.Option(Int),
  color_to color_to: option.Option(Int),
  hoisted hoisted: option.Option(Bool),
) -> Result(space.GatewayRole, error.DuvetError)
pub fn create_room(
  client: client.RestClient,
  space_id: String,
  name: String,
  room_type: room_type.RoomType,
  parent_id parent_id: option.Option(String),
) -> Result(space.GatewayRoom, error.DuvetError)
pub fn create_room_invite(
  client: client.RestClient,
  space_id: String,
  room_id: String,
  max_age: Int,
) -> Result(String, error.DuvetError)

Makes an invite to the room that works for [max_age] seconds (0: until it is revoked); answers its code.

pub fn create_space(
  client: client.RestClient,
  name: String,
  description description: option.Option(String),
) -> Result(rest.CreatedSpace, error.DuvetError)

Makes a space, with a text and a voice room; answers it with its rooms.

pub fn create_space_bucket(
  client: client.RestClient,
  space_id: String,
  data: rest.BucketPayload,
) -> Result(rest.StorageBucket, error.DuvetError)
pub fn create_sticker(
  client: client.RestClient,
  space_id: String,
  name: String,
  file: multipart.FilePart,
  on_progress on_progress: option.Option(fn(Int, Int) -> Nil),
) -> Result(space.SpaceSticker, error.DuvetError)
pub fn create_team(
  client: client.RestClient,
  name: String,
) -> Result(rest.Team, error.DuvetError)
pub fn create_webhook(
  client: client.RestClient,
  space_id: String,
  room_id: String,
  username: String,
  avatar avatar: option.Option(multipart.FilePart),
) -> Result(rest.WebhookCreateResponse, error.DuvetError)
pub fn deactivate_my_bucket(
  client: client.RestClient,
  id: String,
) -> Result(Nil, error.DuvetError)
pub fn deactivate_space_bucket(
  client: client.RestClient,
  space_id: String,
  bucket_id: String,
) -> Result(Nil, error.DuvetError)
pub fn decline_team_invite(
  client: client.RestClient,
  invite_id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_all_my_attachments(
  client: client.RestClient,
) -> Result(Nil, error.DuvetError)
pub fn delete_all_space_attachments(
  client: client.RestClient,
  space_id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_application(
  client: client.RestClient,
  team_id: String,
  app_id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_bot(
  client: client.RestClient,
  team_id: String,
  app_id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_direct_message(
  client: client.RestClient,
  conversation_id: String,
  message_id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_emoji(
  client: client.RestClient,
  space_id: String,
  emoji_id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_message(
  client: client.RestClient,
  message_id: String,
  room_id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_my_attachment(
  client: client.RestClient,
  id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_my_bucket(
  client: client.RestClient,
  id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_role(
  client: client.RestClient,
  space_id: String,
  role_id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_room(
  client: client.RestClient,
  space_id: String,
  room_id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_room_overwrite(
  client: client.RestClient,
  space_id: String,
  room_id: String,
  target_id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_space(
  client: client.RestClient,
  space_id: String,
) -> Result(Nil, error.DuvetError)

Deletes the space, which only its owner may do.

pub fn delete_space_attachment(
  client: client.RestClient,
  space_id: String,
  attachment_id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_space_bucket(
  client: client.RestClient,
  space_id: String,
  bucket_id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_sticker(
  client: client.RestClient,
  space_id: String,
  sticker_id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_team(
  client: client.RestClient,
  team_id: String,
) -> Result(Nil, error.DuvetError)
pub fn delete_webhook(
  client: client.RestClient,
  space_id: String,
  room_id: String,
  webhook_id: String,
) -> Result(Nil, error.DuvetError)
pub fn forget_space_commands(
  client: client.RestClient,
  space_id: String,
) -> Nil
pub fn forgot_password(
  client: client.RestClient,
  email: String,
) -> Result(Nil, error.DuvetError)
pub fn get_bot_user(
  client: client.RestClient,
  user_id: String,
) -> Result(user.BotUser, error.DuvetError)
pub fn get_conversation_message_thread(
  client: client.RestClient,
  conversation_id: String,
  message_id: String,
) -> Result(List(conversation.DirectMessage), error.DuvetError)

A conversation message’s reply thread, oldest first.

pub fn get_conversation_pins(
  client: client.RestClient,
  conversation_id: String,
) -> Result(List(conversation.DirectMessage), error.DuvetError)

A conversation’s pinned messages, the last pinned first.

pub fn get_conversations(
  client: client.RestClient,
) -> Result(List(conversation.Conversation), error.DuvetError)
pub fn get_direct_message_by_id(
  client: client.RestClient,
  conversation_id: String,
  message_id: String,
) -> Result(conversation.DirectMessage, error.DuvetError)
pub fn get_direct_messages(
  client: client.RestClient,
  conversation_id: String,
  before before: option.Option(String),
  count count: Int,
) -> Result(List(conversation.DirectMessage), error.DuvetError)

A page of the conversation’s messages before [before] (the newest without it), newest first: [count] of them, 1 to 100.

pub fn get_direct_messages_after(
  client: client.RestClient,
  conversation_id: String,
  after: String,
) -> Result(List(conversation.DirectMessage), error.DuvetError)
pub fn get_friends(
  client: client.RestClient,
) -> Result(List(conversation.Friend), error.DuvetError)
pub fn get_invite(
  client: client.RestClient,
  code: String,
) -> Result(rest.InviteInfo, error.DuvetError)
pub fn get_mention_counts(
  client: client.RestClient,
) -> dict.Dict(String, Int)

The unread mentions of each room and conversation, by its ID. Answers none when the request fails.

pub fn get_message_by_id(
  client: client.RestClient,
  room_id: String,
  message_id: String,
) -> Result(message.GatewayMessage, error.DuvetError)
pub fn get_message_thread(
  client: client.RestClient,
  room_id: String,
  message_id: String,
) -> Result(List(message.GatewayMessage), error.DuvetError)
pub fn get_messages(
  client: client.RestClient,
  room_id: String,
  before before: option.Option(String),
  count count: Int,
) -> Result(List(message.GatewayMessage), error.DuvetError)

A page of the room’s messages before [before] (the newest without it), newest first: [count] of them, 1 to 100.

pub fn get_messages_after(
  client: client.RestClient,
  room_id: String,
  after: String,
) -> Result(List(message.GatewayMessage), error.DuvetError)
pub fn get_my_attachments(
  client: client.RestClient,
) -> Result(List(attachment.Attachment), error.DuvetError)
pub fn get_my_buckets(
  client: client.RestClient,
) -> Result(List(rest.StorageBucket), error.DuvetError)
pub fn get_my_storage_status(
  client: client.RestClient,
) -> Result(rest.StorageStatus, error.DuvetError)
pub fn get_pending_requests(
  client: client.RestClient,
) -> Result(List(conversation.FriendRequest), error.DuvetError)
pub fn get_room_pins(
  client: client.RestClient,
  room_id: String,
) -> Result(List(message.GatewayMessage), error.DuvetError)

A room’s pinned messages, the last pinned first.

pub fn get_sent_requests(
  client: client.RestClient,
) -> Result(List(conversation.FriendRequest), error.DuvetError)
pub fn get_space_attachments(
  client: client.RestClient,
  space_id: String,
) -> Result(List(attachment.Attachment), error.DuvetError)
pub fn get_space_buckets(
  client: client.RestClient,
  space_id: String,
) -> Result(List(rest.StorageBucket), error.DuvetError)
pub fn get_space_commands(
  client: client.RestClient,
  space_id: String,
) -> Result(rest.SpaceCommands, error.DuvetError)

The space’s commands, kept for a few minutes, or until [forget_space_commands] (the space’s members changed: a bot came or went). A failed request isn’t kept.

pub fn get_space_members(
  client: client.RestClient,
  space_id: String,
  after_id after_id: option.Option(String),
  after_pos after_pos: option.Option(Int),
) -> Result(List(rest.SpaceMemberWithUser), error.DuvetError)

A page of the space’s members, by their highest role and then their ID.

pub fn get_space_storage_used(
  client: client.RestClient,
  space_id: String,
) -> Result(Int, error.DuvetError)

The bytes the space’s files take.

pub fn invite_to_team(
  client: client.RestClient,
  team_id: String,
  email: String,
) -> Result(Nil, error.DuvetError)
pub fn join_invite(
  client: client.RestClient,
  code: String,
) -> Result(rest.InviteInfo, error.DuvetError)
pub fn leave_conversation(
  client: client.RestClient,
  conversation_id: String,
) -> Result(Nil, error.DuvetError)
pub fn leave_space(
  client: client.RestClient,
  space_id: String,
) -> Result(Nil, error.DuvetError)
pub fn list_applications(
  client: client.RestClient,
  team_id: String,
) -> Result(List(rest.Application), error.DuvetError)
pub fn list_emojis(
  client: client.RestClient,
  space_id: String,
) -> Result(List(space.SpaceEmoji), error.DuvetError)
pub fn list_my_team_invites(
  client: client.RestClient,
) -> Result(List(rest.TeamInvite), error.DuvetError)
pub fn list_space_invites(
  client: client.RestClient,
  space_id: String,
) -> Result(List(rest.InviteLink), error.DuvetError)

The space’s invites that still work.

pub fn list_stickers(
  client: client.RestClient,
  space_id: String,
) -> Result(List(space.SpaceSticker), error.DuvetError)
pub fn list_team_members(
  client: client.RestClient,
  team_id: String,
) -> Result(List(rest.TeamMember), error.DuvetError)
pub fn list_teams(
  client: client.RestClient,
) -> Result(List(rest.Team), error.DuvetError)
pub fn list_webhooks(
  client: client.RestClient,
  space_id: String,
  room_id: String,
) -> Result(List(rest.Webhook), error.DuvetError)
pub fn pin_conversation_message(
  client: client.RestClient,
  conversation_id: String,
  message_id: String,
) -> Result(Nil, error.DuvetError)

Pins a message of a conversation, which posts its pin notice.

pub fn pin_room_message(
  client: client.RestClient,
  room_id: String,
  message_id: String,
) -> Result(Nil, error.DuvetError)

Pins a message of a room, which posts the room’s pin notice.

pub fn reject_friend_request(
  client: client.RestClient,
  request_id: String,
) -> Result(Nil, error.DuvetError)
pub fn remove_bot_from_space(
  client: client.RestClient,
  space_id: String,
  bot_user_id: String,
) -> Result(Nil, error.DuvetError)
pub fn remove_conversation_member(
  client: client.RestClient,
  conversation_id: String,
  user_id: String,
) -> Result(Nil, error.DuvetError)
pub fn remove_conversation_reaction(
  client: client.RestClient,
  conv_id: String,
  message_id: String,
  emoji_name: String,
) -> Result(Nil, error.DuvetError)
pub fn remove_role_from_member(
  client: client.RestClient,
  space_id: String,
  role_id: String,
  member_id: String,
) -> Result(Nil, error.DuvetError)
pub fn remove_room_reaction(
  client: client.RestClient,
  room_id: String,
  message_id: String,
  emoji_name: String,
) -> Result(Nil, error.DuvetError)
pub fn remove_team_member(
  client: client.RestClient,
  team_id: String,
  user_id: String,
) -> Result(Nil, error.DuvetError)
pub fn reset_bot_token(
  client: client.RestClient,
  team_id: String,
  app_id: String,
) -> Result(String, error.DuvetError)

Answers the bot’s new token.

pub fn reset_password(
  client: client.RestClient,
  token: String,
  password: String,
) -> Result(Nil, error.DuvetError)
pub fn reset_webhook_token(
  client: client.RestClient,
  space_id: String,
  room_id: String,
  webhook_id: String,
) -> Result(String, error.DuvetError)

Answers the webhook’s new token.

pub fn revoke_invite(
  client: client.RestClient,
  space_id: String,
  invite_id: String,
) -> Result(Nil, error.DuvetError)
pub fn search_conversation_messages(
  client: client.RestClient,
  conversation_id: String,
  search: rest.MessageSearch,
) -> Result(
  rest.MessageSearchResponse(conversation.DirectMessage),
  error.DuvetError,
)
pub fn search_space_messages(
  client: client.RestClient,
  space_id: String,
  search: rest.MessageSearch,
) -> Result(
  rest.MessageSearchResponse(message.GatewayMessage),
  error.DuvetError,
)
pub fn send_change_email(
  client: client.RestClient,
  email: String,
) -> Result(Nil, error.DuvetError)
pub fn send_conversation_recording(
  client: client.RestClient,
  conversation_id: String,
) -> Result(Nil, error.DuvetError)

Tells the conversation the user is recording a voice message.

pub fn send_conversation_typing(
  client: client.RestClient,
  conversation_id: String,
) -> Result(Nil, error.DuvetError)

Tells the conversation the user is typing.

pub fn send_direct_message(
  client: client.RestClient,
  conversation_id: String,
  content: String,
  options: SendMessageOptions(a),
) -> Result(conversation.DirectMessage, error.DuvetError)

Sends a message to the conversation. With files, it goes as a multipart form, which carries no embeds or sticker.

pub fn send_dm_voice_note(
  client: client.RestClient,
  conversation_id: String,
  audio: BitArray,
  nonce nonce: option.Option(String),
  format format: String,
) -> Result(conversation.DirectMessage, error.DuvetError)

Sends a voice message to the conversation.

pub fn send_friend_request(
  client: client.RestClient,
  user_id: String,
) -> Result(conversation.FriendRequest, error.DuvetError)

Answers the bare request, without the other user’s details.

pub fn send_message(
  client: client.RestClient,
  room_id: String,
  content: String,
  options: SendMessageOptions(a),
) -> Result(message.GatewayMessage, error.DuvetError)

Sends a message to the room. With files, it goes as a multipart form, which carries no embeds or sticker.

pub fn send_message_options() -> SendMessageOptions(a)
pub fn send_recording_indicator(
  client: client.RestClient,
  room_id: String,
) -> Nil

Tells the room the user is recording a voice message. Failures are ignored.

pub fn send_reset_password_email(
  client: client.RestClient,
) -> Result(Nil, error.DuvetError)
pub fn send_typing_indicator(
  client: client.RestClient,
  room_id: String,
) -> Nil

Tells the room the user is typing. Failures are ignored.

pub fn send_verification_email(
  client: client.RestClient,
) -> Result(Nil, error.DuvetError)
pub fn send_voice_note(
  client: client.RestClient,
  room_id: String,
  audio: BitArray,
  nonce nonce: option.Option(String),
  format format: String,
) -> Result(message.GatewayMessage, error.DuvetError)

Sends a voice message to the room: [audio] is a recording in webm (WebM/Opus, as the desktop app records), ogg (Ogg/Opus) or m4a (AAC in MP4).

pub fn set_status(
  client: client.RestClient,
  status: user_status.UserStatus,
) -> Result(user.UserMeResult, error.DuvetError)

Chooses the user’s status: online or do not disturb. Offline isn’t a choice, and nothing is sent for it.

pub fn sign_in(
  client: client.RestClient,
  username username: String,
  password password: String,
  email email: String,
  alias alias: option.Option(String),
) -> Result(Nil, error.DuvetError)

Makes an account; it is verified by the link the API emails.

pub fn submit_modal(
  client: client.RestClient,
  room_id: String,
  application_id: String,
  custom_id: String,
  components: List(dict.Dict(String, dynamic.Dynamic)),
  message_id message_id: option.Option(String),
) -> Result(rest.InteractionReply, error.DuvetError)

Submits a modal the application’s bot opened in a room.

pub fn unfriend(
  client: client.RestClient,
  user_id: String,
) -> Result(Nil, error.DuvetError)
pub fn unpin_conversation_message(
  client: client.RestClient,
  conversation_id: String,
  message_id: String,
) -> Result(Nil, error.DuvetError)
pub fn unpin_room_message(
  client: client.RestClient,
  room_id: String,
  message_id: String,
) -> Result(Nil, error.DuvetError)
pub fn update_application(
  client: client.RestClient,
  team_id: String,
  app_id: String,
  name name: option.Option(String),
  description description: option.Option(String),
  public public: option.Option(Bool),
) -> Result(rest.Application, error.DuvetError)
pub fn update_bot(
  client: client.RestClient,
  team_id: String,
  app_id: String,
  username username: option.Option(String),
  alias alias: option.Option(String),
  clear_alias clear_alias: Bool,
  avatar avatar: option.Option(multipart.FilePart),
  banner banner: option.Option(multipart.FilePart),
  remove_avatar remove_avatar: Bool,
  remove_banner remove_banner: Bool,
) -> Result(dict.Dict(String, dynamic.Dynamic), error.DuvetError)

Updates the application’s bot. Clearing the alias removes it.

pub fn update_conversation(
  client: client.RestClient,
  conversation_id: String,
  name: String,
) -> Result(conversation.Conversation, error.DuvetError)
pub fn update_direct_message(
  client: client.RestClient,
  conversation_id: String,
  message_id: String,
  content: String,
) -> Result(conversation.DirectMessage, error.DuvetError)
pub fn update_emoji(
  client: client.RestClient,
  space_id: String,
  emoji_id: String,
  name: String,
) -> Result(space.SpaceEmoji, error.DuvetError)
pub fn update_message(
  client: client.RestClient,
  message_id: String,
  content: String,
  room_id: String,
) -> Result(message.GatewayMessage, error.DuvetError)
pub fn update_my_bucket(
  client: client.RestClient,
  id: String,
  data: rest.BucketPayload,
) -> Result(rest.StorageBucket, error.DuvetError)
pub fn update_role(
  client: client.RestClient,
  space_id: String,
  role_id: String,
  name name: option.Option(String),
  permissions permissions: option.Option(Int),
  color_from color_from: option.Option(Int),
  color_via color_via: option.Option(Int),
  color_to color_to: option.Option(Int),
  hoisted hoisted: option.Option(Bool),
  position position: option.Option(Int),
  clear_colors clear_colors: Bool,
) -> Result(space.GatewayRole, error.DuvetError)

Updates the role. Only the arguments given are sent; with clear_colors, the null colors clear those of the role.

pub fn update_room(
  client: client.RestClient,
  space_id: String,
  room_id: String,
  name name: option.Option(String),
  description description: option.Option(String),
  clear_description clear_description: Bool,
  parent_id parent_id: option.Option(String),
  clear_parent clear_parent: Bool,
  position position: option.Option(Int),
) -> Result(space.GatewayRoom, error.DuvetError)

Updates the room. Only the arguments given are sent; clearing sends null for the description or the parent.

pub fn update_space(
  client: client.RestClient,
  space_id: String,
  name name: option.Option(String),
  description description: option.Option(String),
  locale locale: option.Option(String),
  banner banner: option.Option(multipart.FilePart),
  icon icon: option.Option(multipart.FilePart),
  remove_banner remove_banner: Bool,
  remove_icon remove_icon: Bool,
  on_progress on_progress: option.Option(fn(Int, Int) -> Nil),
) -> Result(dict.Dict(String, dynamic.Dynamic), error.DuvetError)

Updates the space. A new banner or icon, or removing one, sends a multipart form; anything else goes as JSON.

pub fn update_space_bucket(
  client: client.RestClient,
  space_id: String,
  bucket_id: String,
  data: rest.BucketPayload,
) -> Result(rest.StorageBucket, error.DuvetError)
pub fn update_sticker(
  client: client.RestClient,
  space_id: String,
  sticker_id: String,
  name: String,
) -> Result(space.SpaceSticker, error.DuvetError)
pub fn update_team(
  client: client.RestClient,
  team_id: String,
  name: String,
) -> Result(rest.Team, error.DuvetError)
pub fn update_user(
  client: client.RestClient,
  username username: option.Option(String),
  alias alias: option.Option(String),
  clear_alias clear_alias: Bool,
  avatar avatar: option.Option(String),
  clear_avatar clear_avatar: Bool,
  banner banner: option.Option(String),
  clear_banner clear_banner: Bool,
  custom custom: option.Option(String),
) -> Result(user.UserMeResult, error.DuvetError)

Updates the user. Only the arguments given are sent, and the API keeps what is left out. Clearing sends null for the alias, avatar or banner.

pub fn update_user_flags_badges(
  client: client.RestClient,
  user_id: String,
  flags flags: option.Option(Int),
  badges badges: option.Option(Int),
) -> Result(dict.Dict(String, dynamic.Dynamic), error.DuvetError)
pub fn update_webhook(
  client: client.RestClient,
  space_id: String,
  room_id: String,
  webhook_id: String,
  username username: option.Option(String),
  avatar avatar: option.Option(multipart.FilePart),
  remove_avatar remove_avatar: Bool,
) -> Result(rest.Webhook, error.DuvetError)
pub fn upload_profile_image(
  client: client.RestClient,
  kind: ProfileImageKind,
  bytes: BitArray,
  filename: String,
  on_progress on_progress: option.Option(fn(Int, Int) -> Nil),
) -> Result(user.UserMeResult, error.DuvetError)

Sets the user’s avatar or banner to the image as given.

pub fn upsert_room_overwrite(
  client: client.RestClient,
  space_id: String,
  room_id: String,
  target_id: String,
  target_type: Int,
  allow_flags: Int,
  deny_flags: Int,
) -> Result(space.GatewayRoomOverwrite, error.DuvetError)
pub fn use_command(
  client: client.RestClient,
  room_id: String,
  application_id: String,
  data: rest.CommandUse,
) -> Result(rest.InteractionReply, error.DuvetError)

Uses an application’s command in a room, and answers the bot’s first response.

pub fn use_component(
  client: client.RestClient,
  room_id: String,
  message_id: String,
  data: rest.ComponentUse,
) -> Result(rest.InteractionReply, error.DuvetError)

Uses a component of a bot’s message in a room.

pub fn verify_email(
  client: client.RestClient,
  token: String,
) -> Result(Nil, error.DuvetError)
✨ Search Document