Overview
Properties
Constructor
Properties
updateDate
Type: Date
The last date when the user changed anything in their profile, e.g. their description or their profile picture.
Methods
blockUser(userToBlock)
asyncBlocks a user.
Parameter | Type | Description |
---|---|---|
userToBlock | UserIdResolvable | The user to block. |
followChannel(channel, notifications)
asyncFollows a channel.
Parameter | Type | Description |
---|---|---|
channel | UserIdResolvable | The channel to follow. |
notifications | boolean | Whether the user will receive notifications. |
follows(channel)
asyncChecks whether the user is following the given channel.
Parameter | Type | Description |
---|---|---|
channel | UserIdResolvable | The channel to check for the user's follow. |
getChannelPlaceholder()
Gets a channel placeholder object for the user, which can do anything you can do to a channel with just the ID.
getFollows(page, limit, orderBy, orderDirection)
asyncRetrieves a list of channels followed by the user.
Parameter | Type | Description |
---|---|---|
page | number | The result page you want to retrieve. |
limit | number | The number of results you want to retrieve. |
orderBy | "created_at" | "last_broadcast" | "login" | The field to order by. |
orderDirection | "asc" | "desc" | The direction to order in - ascending or descending. |
getFollowTo(channel)
asyncRetrieves the follow data of the user to a given channel.
Parameter | Type | Description |
---|---|---|
channel | UserIdResolvable | The channel to retrieve the follow data for. |
getSubscriptionTo(channel)
asyncRetrieves the subscription data for the user to the given channel.
Throws if the channel doesn't have a subscription program or the user is not subscribed to it.
This method requires access to the user. If you only have access to the channel, use ChannelPlaceholder#getSubscriptionBy instead.
Parameter | Type | Description |
---|---|---|
channel | UserIdResolvable | The channel you want to get the subscription data for. |
isSubscribedTo(channel)
asyncChecks whether the user is subscribed to the given channel.
Parameter | Type | Description |
---|---|---|
channel | UserIdResolvable | The channel you want to check the subscription for. |
unblockUser(userToUnblock)
asyncUnblocks a user.
Parameter | Type | Description |
---|---|---|
userToUnblock | UserIdResolvable | The user to unblock. |
unfollowChannel(channel)
asyncUnfollows a channel.
Parameter | Type | Description |
---|---|---|
channel | UserIdResolvable | The channel to unfollow. |