View Source Nostrum.Struct.Invite (Nostrum v0.9.0)

Struct representing a Discord invite.

Summary

Types

Approximate total member count of the guild this invite is for.

Approximate online member count of the guild this invite is for.

The channel this invite is for.

The invite code (unique ID).

When this invite was created.

An invite with metadata.

Partially populated guild struct of the guild this invite is for.

The user who created this invite.

Duration (in seconds) after which the invite expires.

Max number of times this invite can be used.

An invite without metadata.

t()

Partially populated user struct of the target user for this invite.

The type of user target for this invite.

Whether this invite only grants temporary membership.

Number of times this invite has been used.

Types

Link to this type

approximate_member_count()

View Source
@type approximate_member_count() :: integer() | nil

Approximate total member count of the guild this invite is for.

Link to this type

approximate_presence_count()

View Source
@type approximate_presence_count() :: integer() | nil

Approximate online member count of the guild this invite is for.

@type channel() :: Nostrum.Struct.Channel.t()

The channel this invite is for.

@type code() :: String.t()

The invite code (unique ID).

@type created_at() :: String.t()

When this invite was created.

@type detailed_invite() :: %Nostrum.Struct.Invite{
  approximate_member_count: approximate_member_count(),
  approximate_presence_count: approximate_presence_count(),
  channel: channel(),
  code: code(),
  created_at: created_at(),
  guild: guild(),
  inviter: inviter(),
  max_age: max_age(),
  max_uses: max_uses(),
  target_user: target_user(),
  target_user_type: target_user_type(),
  temporary: temporary(),
  uses: uses()
}

An invite with metadata.

@type guild() :: Nostrum.Struct.Guild.t() | nil

Partially populated guild struct of the guild this invite is for.

@type inviter() :: Nostrum.Struct.User.t() | nil

The user who created this invite.

@type max_age() :: integer()

Duration (in seconds) after which the invite expires.

@type max_uses() :: integer()

Max number of times this invite can be used.

@type simple_invite() :: %Nostrum.Struct.Invite{
  approximate_member_count: approximate_member_count(),
  approximate_presence_count: approximate_presence_count(),
  channel: channel(),
  code: code(),
  created_at: nil,
  guild: guild(),
  inviter: inviter(),
  max_age: nil,
  max_uses: nil,
  target_user: target_user(),
  target_user_type: target_user_type(),
  temporary: nil,
  uses: nil
}

An invite without metadata.

@type t() :: simple_invite() | detailed_invite()
@type target_user() :: Nostrum.Struct.User.t() | nil

Partially populated user struct of the target user for this invite.

@type target_user_type() :: integer() | nil

The type of user target for this invite.

@type temporary() :: boolean()

Whether this invite only grants temporary membership.

@type uses() :: integer()

Number of times this invite has been used.