Skip to content
SinisterRectus edited this page Nov 16, 2019 · 6 revisions

extends UserPresence

Represents a relationship between the current user and another Discord user. This is generally either a friend or a blocked user. This class should only be relevant to user-accounts; bots cannot normally have relationships.

Instances of this class should not be constructed by users.

Properties Inherited From UserPresence

Name Type Description
activity Activity/nil The Activity that this presence represents.
client Client A shortcut to the client object to which this container is visible.
desktopStatus string The user's desktop status (online, dnd, idle, offline).
mobileStatus string The user's mobile status (online, dnd, idle, offline).
parent Container/Client The parent object of to which this container is a child. For example, the parent of a role is the guild in which the role exists.
status string The user's overall status (online, dnd, idle, offline).
user User The user that this presence represents.
webStatus string The user's web status (online, dnd, idle, offline).

Properties

Name Type Description
name string Equivalent to Relationship.user.username.
type number The relationship type. See the relationshipType enumeration for a human-readable representation.

Methods Inherited From UserPresence

__eq()

Defines the behavior of the == operator. Allows containers to be directly compared according to their type and __hash return values.

Returns: boolean


__hash()

Returns UserPresence.user.id

Returns: string


__tostring()

Defines the behavior of the tostring function. All containers follow the format ClassName: hash.

Returns: string


Clone this wiki locally