Class: User
models.User
A class representing a user.
Table of contents
Accessors
Methods
- getComments
- getModPermissionsForSubreddit
- getPosts
- getSnoovatarUrl
- getUserFlairBySubreddit
- getSocialLinks
- toJSON
Accessors
commentKarma
• get commentKarma(): number
The amount of comment karma the user has.
Returns
number
createdAt
• get createdAt(): Date
The date the user was created.
Returns
Date
id
• get id(): `t2_${string}`
The ID (starting with t2_) of the user to retrieve.
Returns
`t2_${string}`
Example
't2_1w72';
isAdmin
• get isAdmin(): boolean
Whether the user is admin.
Returns
boolean
linkKarma
• get linkKarma(): number
The amount of link karma the user has.
Returns
number
modPermissions
• get modPermissions(): Map<string, ModeratorPermission[]>
The permissions the user has on the subreddit.