Relationship - BestMordaEver/Discordia GitHub Wiki

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
client Client A shortcut to the client object to which this container is visible.
competing Activity/nil The competing Activity that this presence represents.
custom Activity/nil The custom status Activity that this presence represents.
desktopStatus string The user's desktop status (online, dnd, idle, offline).
listening Activity/nil The listening Activity that this presence represents.
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.
playing Activity/nil The game Activity that this presence represents.
status string The user's overall status (online, dnd, idle, offline).
streaming Activity/nil The streaming Activity that this presence represents.
user User The user that this presence represents.
watching Activity/nil The watching Activity 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


⚠️ **GitHub.com Fallback** ⚠️