Class SocketReaction
Represents a WebSocket-based reaction object.
public class SocketReaction : IReaction
- Inheritance
-
SocketReaction
- Implements
- Inherited Members
Properties
BurstColors
Gets colors used for the super reaction.
public IReadOnlyCollection<Color> BurstColors { get; }
Property Value
Remarks
The collection will be empty if the reaction is a normal reaction.
Channel
Gets the channel where the reaction takes place in.
public ISocketMessageChannel Channel { get; }
Property Value
- ISocketMessageChannel
A WebSocket-based message channel.
Emote
The IEmote used in the reaction.
public IEmote Emote { get; }
Property Value
IsBurst
Gets whether the reaction is a super reaction.
public bool IsBurst { get; }
Property Value
Message
Gets the message that has been reacted to if possible.
public Optional<SocketUserMessage> Message { get; }
Property Value
- Optional<SocketUserMessage>
A WebSocket-based message where possible; a value is not always returned.
- See Also
-
Optional<T>
MessageId
Gets the ID of the message that has been reacted to.
public ulong MessageId { get; }
Property Value
- ulong
A message snowflake identifier associated with the message.
ReactionType
Gets the type of the reaction.
public ReactionType ReactionType { get; }
Property Value
User
Gets the user who added the reaction if possible.
public Optional<IUser> User { get; }
Property Value
Remarks
This property attempts to retrieve a WebSocket-cached user that is responsible for this reaction from the client. In other words, when the user is not in the WebSocket cache, this property may not contain a value, leaving the only identifiable information to be UserId.
If you wish to obtain an identifiable user object, consider utilizing DiscordRestClient which will attempt to retrieve the user from REST.
- See Also
-
Optional<T>
UserId
Gets the ID of the user who added the reaction.
public ulong UserId { get; }
Property Value
- ulong
A user snowflake identifier associated with the user.
Remarks
This property retrieves the snowflake identifier of the user responsible for this reaction. This property will always contain the user identifier in event that User cannot be retrieved.
Methods
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
other
object
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.