DiscordPresence class
Declares the presence of the user.
To update the DiscordUser presence, pass the object of this class to DiscordRPC.updatePresence
.
For showing the user's start time from present, you must pass DiscordPresence.startTimeStamp as DateTime.now().millisecondsSinceEpoch
.
Constructors
- DiscordPresence.new({String? state, String? details, int? startTimeStamp, int? endTimeStamp, String? largeImageKey, String? largeImageText, String? smallImageKey, String? smallImageText, String? partyId, int? partySize, int? partySizeMax, String? matchSecret, String? joinSecret, String? spectateSecret, int? instance})
Properties
- details → String?
-
Details about current presence.
final
- endTimeStamp → int?
-
End time stamp. Used to show how much time is left.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- instance → int?
-
Instance.
final
- joinSecret → String?
-
Join secret.
final
- largeImageKey → String?
-
Key of the large image from Discord Developer Portal, to show inside Discord Rich Presence.
final
- largeImageText → String?
-
String describing the large image.
final
- matchSecret → String?
-
Match secret.
final
- partyId → String?
-
Party ID.
final
- partySize → int?
-
Size of the party.
final
- partySizeMax → int?
-
Maximum size of the party.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- smallImageKey → String?
-
Key of the small image from Discord Developer Portal, to show inside Discord Rich Presence.
final
- smallImageText → String?
-
String describing the small image.
final
- spectateSecret → String?
-
Spectate secret.
final
- startTimeStamp → int?
-
Start time stamp. Used to show how much time has passed.
final
- state → String?
-
State of the current presence.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited