Crux v2020-03-17 17:55:51Z Crux.Structs.Invite View Source

Represents a Discord Invite Object

List of what property can be present fetched with what function:

PropertyRest.get_guild_vanity_invite/1Rest.get_invite/1Rest.create_channel_invite/1Rest.delete_invite/1
Rest.get_channel_invites/1
Rest.get_guild_invites/1
codeyesyesyesyes
guildnoif not group dmif not group dmif not group dm
channelnoyesyesyes
inviternoyesyesyes
usesyesnoyesno
max_usesnonoyesno
max_agenonoyesno
temporarynonoyesno
created_atnonoyesno
revokednononono
approximate_presence_countnoyesnono
approximate_member_countnoyesnono

Notes:

  • :guild only has:verification_level, :features, :name, :splash, :id, and :icon.
  • :channel only has :type, :id and :name.

You can, if applicable, fetch the full structs from cache.

Link to this section Summary

Functions

Creates a Crux.Structs.Invite.t/0 struct from raw data.

Link to this section Types

Link to this type

t() View Source (since 0.1.0)
t() :: %Crux.Structs.Invite{
  approximate_member_count: integer() | nil,
  approximate_presence_count: integer() | nil,
  channel: Crux.Structs.Channel.t(),
  code: String.t(),
  created_at: String.t() | nil,
  guild: Crux.Structs.Guild.t(),
  inviter: Crux.Structs.User.t() | nil,
  max_age: integer() | nil,
  max_uses: integer() | nil,
  revoked: boolean() | nil,
  temporary: boolean() | nil,
  uses: integer() | nil
}

Link to this section Functions

Link to this function

create(data) View Source (since 0.1.0)
create(data :: map()) :: t()

Creates a Crux.Structs.Invite.t/0 struct from raw data.

Automatically invoked by Crux.Structs.create/2.