Class: FullComment
#
Hierarchy_Comment<typeof default, this> & default<this>
↳ FullComment
#
Implements#
Properties#
approved• approved: null
| default
Inherited from: _Comment(FullPost).approved
Defined in: objects/post/full.ts:40
#
archived• archived: boolean
Inherited from: _Comment(FullPost).archived
Defined in: objects/post/full.ts:34
#
author• author: null
| SubmissionUser
The user who posted this or null if he's 'u/[deleted]'
Inherited from: _Comment(FullPost).author
Defined in: objects/post/full.ts:12
#
awardCount• awardCount: number
Inherited from: _Comment(FullPost).awardCount
Defined in: objects/post/full.ts:30
#
awards• awards: GivenAward[]
Inherited from: _Comment(FullPost).awards
Defined in: objects/post/full.ts:31
#
body• body: Content
The comment body
Defined in: objects/post/comment/full.ts:12
#
comments• comments: CommentTree<Submission | FullComment>
Defined in: objects/post/comment/full.ts:9
#
created• created: Date
The date this thing was created.
Inherited from: _Comment(FullPost).created
Defined in: objects/post/full.ts:17
#
deleted• deleted: boolean
Inherited from: _Comment(FullPost).deleted
Defined in: objects/post/full.ts:39
#
distinguished• distinguished: DistinguishKinds
Inherited from: _Comment(FullPost).distinguished
Defined in: objects/post/full.ts:37
#
edited• edited: null
| Date
The date the body was edited or null
if it wasn't.
Inherited from: _Comment(FullPost).edited
Defined in: objects/post/full.ts:19
#
fullId• fullId: string
Implementation of: Comment.fullId
Inherited from: _Comment(FullPost).fullId
Defined in: objects/post/small.ts:15
#
id• id: string
Implementation of: Comment.id
Inherited from: _Comment(FullPost).id
Defined in: objects/post/small.ts:14
#
locked• locked: boolean
Inherited from: _Comment(FullPost).locked
Defined in: objects/post/full.ts:35
#
r• r: Reddit
Implementation of: Comment.r
Inherited from: _Comment(FullPost).r
Defined in: objects/post/small.ts:12
#
removed• removed: null
| default
Inherited from: _Comment(FullPost).removed
Defined in: objects/post/full.ts:41
#
saved• saved: boolean
Inherited from: _Comment(FullPost).saved
Defined in: objects/post/full.ts:33
#
score• score: null
| number
The fuzzed score it has or null
if it's hidden.
Inherited from: _Comment(FullPost).score
Defined in: objects/post/full.ts:24
#
scoreHidden• scoreHidden: boolean
Whether the score is hidden.
Inherited from: _Comment(FullPost).scoreHidden
Defined in: objects/post/full.ts:26
#
sticky• sticky: boolean
Inherited from: _Comment(FullPost).sticky
Defined in: objects/post/full.ts:36
#
submission• submission: Submission
Implementation of: Comment.submission
Inherited from: _Comment(FullPost).submission
Defined in: objects/post/comment/small.ts:10
#
subreddit• subreddit: User | Subreddit
The subreddit it was posted on or a user if it was posted directly on it's profile
Inherited from: _Comment(FullPost).subreddit
Defined in: objects/post/full.ts:14
#
url• url: string
Inherited from: _Comment(FullPost).url
Defined in: objects/post/full.ts:21
#
voted• voted: VoteDirection
The vote the user casted on this. Use vote to change it.
Inherited from: _Comment(FullPost).voted
Defined in: objects/post/full.ts:28
#
Accessors#
key• get key(): string
Returns: string
Defined in: objects/post/small.ts:17
#
Methods#
approveâ–¸ approve(): Promise<void>
Returns: Promise<void>
Implementation of: Comment.approve
Inherited from: _Comment(FullPost).approve
Defined in: objects/post/small.ts:103
#
awardâ–¸ award(award
: Award, anonymous
: boolean): Promise<void>
#
ParametersName | Type |
---|---|
award | Award |
anonymous | boolean |
Returns: Promise<void>
Implementation of: Comment.award
Inherited from: _Comment(FullPost).award
Defined in: objects/post/small.ts:53
#
commentâ–¸ comment(body
: string): Promise<void>
#
ParametersName | Type |
---|---|
body | string |
Returns: Promise<void>
Implementation of: Comment.comment
Inherited from: _Comment(FullPost).comment
Defined in: objects/post/small.ts:108
#
deleteâ–¸ delete(): Promise<void>
Delete this thing
Returns: Promise<void>
Implementation of: Comment.delete
Inherited from: _Comment(FullPost).delete
Defined in: objects/post/small.ts:30
#
distinguishâ–¸ distinguish(kind?
: DistinguishKinds): Promise<void>
#
ParametersName | Type | Default value |
---|---|---|
kind | DistinguishKinds | "mod" |
Returns: Promise<void>
Implementation of: Comment.distinguish
Inherited from: _Comment(FullPost).distinguish
Defined in: objects/post/small.ts:95
#
editâ–¸ edit(body
: string): Promise<void>
Edit the body of a submission or comment
#
ParametersName | Type | Description |
---|---|---|
body | string | The new body in markdown |
Returns: Promise<void>
Implementation of: Comment.edit
Inherited from: _Comment(FullPost).edit
Defined in: objects/post/small.ts:66
#
fetchâ–¸ fetch(): Promise<null
| FullComment>
Returns: Promise<null
| FullComment>
Implementation of: Comment.fetch
Inherited from: _Comment(FullPost).fetch
Defined in: objects/post/comment/small.ts:19
#
hideâ–¸ hide(save?
: boolean): Promise<void>
#
ParametersName | Type | Default value |
---|---|---|
save | boolean | true |
Returns: Promise<void>
Implementation of: Comment.hide
Inherited from: _Comment(FullPost).hide
Defined in: objects/post/small.ts:81
#
lockâ–¸ lock(lock?
: boolean): Promise<void>
#
ParametersName | Type | Default value |
---|---|---|
lock | boolean | true |
Returns: Promise<void>
Implementation of: Comment.lock
Inherited from: _Comment(FullPost).lock
Defined in: objects/post/small.ts:88
#
saveâ–¸ save(save?
: boolean): Promise<void>
#
ParametersName | Type | Default value |
---|---|---|
save | boolean | true |
Returns: Promise<void>
Implementation of: Comment.save
Inherited from: _Comment(FullPost).save
Defined in: objects/post/small.ts:74
#
voteâ–¸ vote(dir
: VoteDirection): Promise<void>
Casting a vote on a submission or comment
Note: votes must be cast by humans. That is, API clients proxying a human's action one-for-one are OK, but bots deciding how to vote on content or amplifying a human's vote are not. See the reddit rules for more details on what constitutes vote cheating.
#
ParametersName | Type | Description |
---|---|---|
dir | VoteDirection | The direction of the vote 1 = upvote \ 0 = unvote \ -1 = downvote |
Returns: Promise<void>
Implementation of: Comment.vote
Inherited from: _Comment(FullPost).vote
Defined in: objects/post/small.ts:48