Crux vdev Crux.Structs.Invite View Source

Represents a Discord Invite Object

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

PropertyRest.get_invite/1Rest.create_channel_invite/1Rest.delete_invite/1
Rest.get_channel_invites/1
Rest.get_guild_invites/1
codeyesyesyes
guildif not group dmif not group dmif not group dm
channelyesyesyes
inviteryesyesyes
usesnoyesno
max_usesnoyesno
max_agenoyesno
temporarynoyesno
created_atnoyesno
revokednonono
approximate_presence_countyesnono
approximate_member_countyesnono

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 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)

Creates a Crux.Structs.Invite struct from raw data.

Automatically invoked by Crux.Structs.create/2.