Skip to main content

Class: FullSubmission

Hierarchy#

  • _Submission<typeof default, this> & default<this>

    ↳ FullSubmission

Implements#

Properties#

approved#

• approved: null | default

Inherited from: _Submission(FullPost).approved

Defined in: objects/post/full.ts:40


archived#

• archived: boolean

Inherited from: _Submission(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: _Submission(FullPost).author

Defined in: objects/post/full.ts:12


awardCount#

• awardCount: number

Inherited from: _Submission(FullPost).awardCount

Defined in: objects/post/full.ts:30


awards#

• awards: GivenAward[]

Inherited from: _Submission(FullPost).awards

Defined in: objects/post/full.ts:31


body#

• body: null | Content

Defined in: objects/post/submission/full.ts:59


collections#

• collections: Collection[]

The collections this submission is a part of

Defined in: objects/post/submission/full.ts:52


commentCount#

• commentCount: number

Defined in: objects/post/submission/full.ts:34


created#

• created: Date

The date this thing was created.

Inherited from: _Submission(FullPost).created

Defined in: objects/post/full.ts:17


crosspost#

• crosspost: null | FullSubmission

The crosspost this submission contains

Defined in: objects/post/submission/full.ts:40


crosspostCount#

• crosspostCount: number

How often this submission has been crossposted to other subreddits

see crossposts to fetch them

Defined in: objects/post/submission/full.ts:46


crosspostable#

• crosspostable: boolean

Whether the subreddit allows this submission to be crossposted

Defined in: objects/post/submission/full.ts:49


deleted#

• deleted: boolean

Inherited from: _Submission(FullPost).deleted

Defined in: objects/post/full.ts:39


distinguished#

• distinguished: DistinguishKinds

Inherited from: _Submission(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: _Submission(FullPost).edited

Defined in: objects/post/full.ts:19


embed#

• embed: null | Embed

Defined in: objects/post/submission/full.ts:67


event#

• event: null | default

Defined in: objects/post/submission/full.ts:54


flair#

• flair: null | Flair

Defined in: objects/post/submission/full.ts:30


fullId#

• fullId: string

Implementation of: Submission.fullId

Inherited from: _Submission(FullPost).fullId

Defined in: objects/post/small.ts:15


hidden#

• hidden: boolean

Defined in: objects/post/submission/full.ts:36


id#

• id: string

Implementation of: Submission.id

Inherited from: _Submission(FullPost).id

Defined in: objects/post/small.ts:14


images#

• images: (GIF | Image)[]

Defined in: objects/post/submission/full.ts:62


link#

• link: null | string

Defined in: objects/post/submission/full.ts:56


locked#

• locked: boolean

Inherited from: _Submission(FullPost).locked

Defined in: objects/post/full.ts:35


nsfw#

• nsfw: boolean

Defined in: objects/post/submission/full.ts:28


oc#

• oc: boolean

Defined in: objects/post/submission/full.ts:26


poll#

• poll: null | Poll

Defined in: objects/post/submission/full.ts:66


promoted#

• promoted: null | default

Defined in: objects/post/submission/full.ts:68


quarantine#

• quarantine: boolean

Defined in: objects/post/submission/full.ts:37


r#

• r: Reddit

Implementation of: Submission.r

Inherited from: _Submission(FullPost).r

Defined in: objects/post/small.ts:12


rawLink#

• rawLink: string

Defined in: objects/post/submission/full.ts:57


removed#

• removed: null | default

Inherited from: _Submission(FullPost).removed

Defined in: objects/post/full.ts:41


robotIndexable#

• robotIndexable: boolean

Defined in: objects/post/submission/full.ts:32


rpan#

• rpan: null | Stream

Defined in: objects/post/submission/full.ts:64


saved#

• saved: boolean

Inherited from: _Submission(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: _Submission(FullPost).score

Defined in: objects/post/full.ts:24


scoreHidden#

• scoreHidden: boolean

Whether the score is hidden.

Inherited from: _Submission(FullPost).scoreHidden

Defined in: objects/post/full.ts:26


spoiler#

• spoiler: boolean

Defined in: objects/post/submission/full.ts:27


sticky#

• sticky: boolean

Inherited from: _Submission(FullPost).sticky

Defined in: objects/post/full.ts:36


subreddit#

• subreddit: User | Subreddit

The subreddit it was posted on or a user if it was posted directly on it's profile

Inherited from: _Submission(FullPost).subreddit

Defined in: objects/post/full.ts:14


thumbnail#

• thumbnail: null | Image

Defined in: objects/post/submission/full.ts:60


title#

• title: string

The title of the submission.

Defined in: objects/post/submission/full.ts:22


upvoteRatio#

• upvoteRatio: number

Defined in: objects/post/submission/full.ts:24


url#

• url: string

Inherited from: _Submission(FullPost).url

Defined in: objects/post/full.ts:21


video#

• video: null | Video

Defined in: objects/post/submission/full.ts:63


voted#

• voted: VoteDirection

The vote the user casted on this. Use vote to change it.

Inherited from: _Submission(FullPost).voted

Defined in: objects/post/full.ts:28

Accessors#

key#

• get key(): string

Returns: string

Defined in: objects/post/small.ts:17


shortUrl#

• get shortUrl(): string

Returns: string

Defined in: objects/post/submission/small.ts:10

Methods#

approve#

â–¸ approve(): Promise<void>

Returns: Promise<void>

Implementation of: Submission.approve

Inherited from: _Submission(FullPost).approve

Defined in: objects/post/small.ts:103


award#

â–¸ award(award: Award, anonymous: boolean): Promise<void>

Parameters#

NameType
awardAward
anonymousboolean

Returns: Promise<void>

Implementation of: Submission.award

Inherited from: _Submission(FullPost).award

Defined in: objects/post/small.ts:53


comment#

â–¸ comment(body: string): Promise<void>

Parameters#

NameType
bodystring

Returns: Promise<void>

Implementation of: Submission.comment

Inherited from: _Submission(FullPost).comment

Defined in: objects/post/small.ts:108


comments#

â–¸ comments(): Promise<CommentTree<Submission | FullComment>>

Returns: Promise<CommentTree<Submission | FullComment>>

Implementation of: Submission.comments

Inherited from: _Submission(FullPost).comments

Defined in: objects/post/submission/small.ts:22


crossposts#

â–¸ crossposts(options?: CrosspostsOptions): Promise<Page<FullSubmission, any>>

Returns all crossposts of this submission

see crosspostsStream

Parameters#

NameType
options?CrosspostsOptions

Returns: Promise<Page<FullSubmission, any>>

Defined in: objects/post/submission/full.ts:267


crosspostsStream#

â–¸ crosspostsStream(options?: CrosspostsStreamOptions): AsyncIterator<FullSubmission, any, undefined>

Parameters#

NameType
options?CrosspostsStreamOptions

Returns: AsyncIterator<FullSubmission, any, undefined>

Defined in: objects/post/submission/full.ts:271


delete#

â–¸ delete(): Promise<void>

Delete this thing

Returns: Promise<void>

Implementation of: Submission.delete

Inherited from: _Submission(FullPost).delete

Defined in: objects/post/small.ts:30


distinguish#

â–¸ distinguish(kind?: DistinguishKinds): Promise<void>

Parameters#

NameTypeDefault value
kindDistinguishKinds"mod"

Returns: Promise<void>

Implementation of: Submission.distinguish

Inherited from: _Submission(FullPost).distinguish

Defined in: objects/post/small.ts:95


duplicates#

â–¸ duplicates(options?: DuplicatesOptions): Promise<Page<FullSubmission, any>>

Returns all duplicates of this submission

see duplicatesStream

Parameters#

NameType
options?DuplicatesOptions

Returns: Promise<Page<FullSubmission, any>>

Defined in: objects/post/submission/full.ts:281


duplicatesStream#

â–¸ duplicatesStream(options?: DuplicatesStreamOptions): AsyncIterator<FullSubmission, any, undefined>

Parameters#

NameType
options?DuplicatesStreamOptions

Returns: AsyncIterator<FullSubmission, any, undefined>

Defined in: objects/post/submission/full.ts:298


edit#

â–¸ edit(body: string): Promise<void>

Edit the body of a submission or comment

Parameters#

NameTypeDescription
bodystringThe new body in markdown

Returns: Promise<void>

Implementation of: Submission.edit

Inherited from: _Submission(FullPost).edit

Defined in: objects/post/small.ts:66


fetch#

â–¸ fetch(): Promise<FullSubmission>

Returns: Promise<FullSubmission>

Implementation of: Submission.fetch

Inherited from: _Submission(FullPost).fetch

Defined in: objects/post/submission/small.ts:14


follow#

â–¸ follow(follow?: boolean): Promise<void>

Parameters#

NameTypeDefault value
followbooleantrue

Returns: Promise<void>

Implementation of: Submission.follow

Inherited from: _Submission(FullPost).follow

Defined in: objects/post/submission/small.ts:30


hide#

â–¸ hide(save?: boolean): Promise<void>

Parameters#

NameTypeDefault value
savebooleantrue

Returns: Promise<void>

Implementation of: Submission.hide

Inherited from: _Submission(FullPost).hide

Defined in: objects/post/small.ts:81


lock#

â–¸ lock(lock?: boolean): Promise<void>

Parameters#

NameTypeDefault value
lockbooleantrue

Returns: Promise<void>

Implementation of: Submission.lock

Inherited from: _Submission(FullPost).lock

Defined in: objects/post/small.ts:88


markNsfw#

â–¸ markNsfw(nsfw?: boolean): Promise<void>

Parameters#

NameTypeDefault value
nsfwbooleantrue

Returns: Promise<void>

Implementation of: Submission.markNsfw

Inherited from: _Submission(FullPost).markNsfw

Defined in: objects/post/submission/small.ts:46


markOc#

â–¸ markOc(oc?: boolean): Promise<void>

Parameters#

NameTypeDefault value
ocbooleantrue

Returns: Promise<void>

Implementation of: Submission.markOc

Inherited from: _Submission(FullPost).markOc

Defined in: objects/post/submission/small.ts:38


markSpoiler#

â–¸ markSpoiler(spoiler?: boolean): Promise<void>

Parameters#

NameTypeDefault value
spoilerbooleantrue

Returns: Promise<void>

Implementation of: Submission.markSpoiler

Inherited from: _Submission(FullPost).markSpoiler

Defined in: objects/post/submission/small.ts:53


markVisited#

â–¸ markVisited(): Promise<void>

Returns: Promise<void>

Implementation of: Submission.markVisited

Inherited from: _Submission(FullPost).markVisited

Defined in: objects/post/submission/small.ts:60


save#

â–¸ save(save?: boolean): Promise<void>

Parameters#

NameTypeDefault value
savebooleantrue

Returns: Promise<void>

Implementation of: Submission.save

Inherited from: _Submission(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.

Parameters#

NameTypeDescription
dirVoteDirectionThe direction of the vote 1 = upvote \ 0 = unvote \ -1 = downvote

Returns: Promise<void>

Implementation of: Submission.vote

Inherited from: _Submission(FullPost).vote

Defined in: objects/post/small.ts:48