Invite class

Annotations
  • @JsonSerializable(includeIfNull: false)

Constructors

Invite({String? code, Guild? guild, Channel? channel, User? inviter, InviteTargetType? targetType, User? targetUser, Application? targetApplication, int? approximatePresenceCount, int? approximateMemberCount, DateTime? expiresAt, InviteStageInstance? stageInstance, GuildScheduledEvent? guildScheduledEvent, int? uses, int? maxUses, int? maxAge, bool? temporary, DateTime? createdAt})
Constructor
Invite.fromJson(Map<String, dynamic> json)
From json
factory

Properties

approximateMemberCount int?
approximate count of total members, returned from the GET /invites/ endpoint when with_counts is true
final
approximatePresenceCount int?
approximate count of online members, returned from the GET /invites/ endpoint when with_counts is true
final
channel Channel?
the channel this invite is for
final
code String?
the invite code (unique ID)
final
createdAt DateTime?
when this invite was created
final
expiresAt DateTime?
the expiration date of this invite, returned from the GET /invites/ endpoint when with_expiration is true
final
guild Guild?
the guild this invite is for
final
guildScheduledEvent GuildScheduledEvent?
guild scheduled event data, only included if guild_scheduled_event_id contains a valid guild scheduled event id
final
hashCode int
The hash code for this object.
no setterinherited
inviter User?
the user who created the invite
final
maxAge int?
duration (in seconds) after which the invite expires
final
maxUses int?
max number of times this invite can be used
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stageInstance InviteStageInstance?
stage instance data if there is a public Stage instance in the Stage channel this invite is for
final
targetApplication Application?
the embedded application to open for this voice channel embedded application invite
final
targetType InviteTargetType?
the type of target for this voice channel invite
final
targetUser User?
the user whose stream to display for this voice channel stream invite
final
temporary bool?
whether this invite only grants temporary membership
final
uses int?
The rest of these fields are from the Invite Metadata structure
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
To json
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited