Skip to main content

Class: Subreddit

Hierarchy#

Implements#

Properties#

[nameSymbol]#

• [nameSymbol]: string

Inherited from: Feed.__@nameSymbol@4220

Defined in: objects/subreddit/feed.ts:12


name#

• name: string

Defined in: objects/subreddit/small.ts:36


r#

• r: Reddit

Inherited from: Feed.r

Defined in: objects/subreddit/feed.ts:10

Accessors#

key#

• get key(): string

Returns: string

Defined in: objects/subreddit/small.ts:37


url#

• get url(): string

Returns: string

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

Methods#

ban#

â–¸ ban(user: User, options?: BanOptions): Promise<void>

Parameters#

NameTypeDefault value
userUser-
optionsBanOptions{}

Returns: Promise<void>

Defined in: objects/subreddit/small.ts:222


controversial#

â–¸ controversial(options?: TimeOptions): Promise<Page<FullSubmission, any>>

Parameters#

NameType
options?TimeOptions

Returns: Promise<Page<FullSubmission, any>>

Inherited from: Feed.controversial

Defined in: objects/subreddit/feed.ts:60


fetch#

â–¸ fetch(): Promise<FullSubreddit>

Returns: Promise<FullSubreddit>

Implementation of: Fetchable.fetch

Defined in: objects/subreddit/small.ts:64


hot#

â–¸ hot(options?: GetOptions): Promise<Page<FullSubmission, any>>

Parameters#

NameType
options?GetOptions

Returns: Promise<Page<FullSubmission, any>>

Inherited from: Feed.hot

Defined in: objects/subreddit/feed.ts:19


inviteModerator#

â–¸ inviteModerator(user: User, permissions?: ModPermission[]): Promise<void>

Parameters#

NameType
userUser
permissions?ModPermission[]

Returns: Promise<void>

Defined in: objects/subreddit/small.ts:146


isReal#

â–¸ isReal(): boolean

Returns: boolean

Defined in: objects/subreddit/small.ts:52


join#

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

Parameters#

NameTypeDefault value
joinbooleantrue

Returns: Promise<void>

Defined in: objects/subreddit/small.ts:251


moderators#

â–¸ moderators(): Promise<ModRelation[]>

Returns: Promise<ModRelation[]>

Defined in: objects/subreddit/small.ts:128


mute#

â–¸ mute(user: User): Promise<void>

Parameters#

NameType
userUser

Returns: Promise<void>

Defined in: objects/subreddit/small.ts:200


new#

â–¸ new(options?: GetOptions): Promise<Page<FullSubmission, any>>

Parameters#

NameType
options?GetOptions

Returns: Promise<Page<FullSubmission, any>>

Inherited from: Feed.new

Defined in: objects/subreddit/feed.ts:29


randomSubmission#

â–¸ randomSubmission(): Promise<FullSubmission>

Returns: Promise<FullSubmission>

Defined in: objects/subreddit/small.ts:345


removeModerator#

â–¸ removeModerator(user: User): Promise<void>

Parameters#

NameType
userUser

Returns: Promise<void>

Defined in: objects/subreddit/small.ts:189


removeModeratorInvite#

â–¸ removeModeratorInvite(user: User): Promise<void>

Parameters#

NameType
userUser

Returns: Promise<void>

Defined in: objects/subreddit/small.ts:178


requirements#

â–¸ requirements(): Promise<Requirements>

Returns: Promise<Requirements>

Defined in: objects/subreddit/small.ts:271


rising#

â–¸ rising(options?: GetOptions): Promise<Page<FullSubmission, any>>

Parameters#

NameType
options?GetOptions

Returns: Promise<Page<FullSubmission, any>>

Inherited from: Feed.rising

Defined in: objects/subreddit/feed.ts:51


rules#

â–¸ rules(): Promise<Rule[]>

Returns: Promise<Rule[]>

Defined in: objects/subreddit/small.ts:262


searchSubmission#

â–¸ searchSubmission(query: string, options?: SubmissionSearchOptions): Promise<Page<FullSubmission, any>>

Parameters#

NameType
querystring
options?SubmissionSearchOptions

Returns: Promise<Page<FullSubmission, any>>

Defined in: objects/subreddit/small.ts:353


setModeratorPermissions#

â–¸ setModeratorPermissions(user: User, permissions: ModPermission[]): Promise<void>

Parameters#

NameType
userUser
permissionsModPermission[]

Returns: Promise<void>

Defined in: objects/subreddit/small.ts:164


sticky#

â–¸ sticky(num?: 1 | 2): Promise<FullSubmission>

Parameters#

NameTypeDefault value
num1 | 21

Returns: Promise<FullSubmission>

Defined in: objects/subreddit/small.ts:337


style#

â–¸ style(): Promise<Style>

Get structured subreddit styles

Returns: Promise<Style>

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


stylesheet#

â–¸ stylesheet(): Promise<string>

Returns: Promise<string>

Defined in: objects/subreddit/small.ts:71


submissionsStream#

â–¸ submissionsStream(options?: StreamOptions): AsyncIterator<FullSubmission, any, undefined>

Parameters#

NameType
options?StreamOptions

Returns: AsyncIterator<FullSubmission, any, undefined>

Inherited from: Feed.submissionsStream

Defined in: objects/subreddit/feed.ts:73


submitCrosspost#

â–¸ submitCrosspost(title: string, submission: Submission, options?: NewSubmissionOptions): Promise<Submission>

Parameters#

NameType
titlestring
submissionSubmission
options?NewSubmissionOptions

Returns: Promise<Submission>

Defined in: objects/subreddit/small.ts:416


submitLink#

â–¸ submitLink(title: string, url: string, options?: NewSubmissionOptions): Promise<Submission>

Parameters#

NameType
titlestring
urlstring
options?NewSubmissionOptions

Returns: Promise<Submission>

Defined in: objects/subreddit/small.ts:369


submitMedia#

â–¸ submitMedia(title: string, file: Stream, name: string, mimetype: string, options?: NewSubmissionOptions): Promise<Submission>

Parameters#

NameType
titlestring
fileStream
namestring
mimetypestring
options?NewSubmissionOptions

Returns: Promise<Submission>

Defined in: objects/subreddit/small.ts:387


submitPoll#

â–¸ submitPoll(title: string, body: undefined | string, items: string[], duration: number, options?: NewSubmissionOptions): Promise<Submission>

Parameters#

NameType
titlestring
bodyundefined | string
itemsstring[]
durationnumber
options?NewSubmissionOptions

Returns: Promise<Submission>

Defined in: objects/subreddit/small.ts:399


submitText#

â–¸ submitText(title: string, body?: string, options?: NewSubmissionOptions): Promise<Submission>

Parameters#

NameType
titlestring
body?string
options?NewSubmissionOptions

Returns: Promise<Submission>

Defined in: objects/subreddit/small.ts:378


top#

â–¸ top(options?: TimeOptions): Promise<Page<FullSubmission, any>>

Parameters#

NameType
options?TimeOptions

Returns: Promise<Page<FullSubmission, any>>

Inherited from: Feed.top

Defined in: objects/subreddit/feed.ts:38


traffic#

â–¸ traffic(): Promise<Traffics>

Returns: Promise<Traffics>

Defined in: objects/subreddit/small.ts:304


unban#

â–¸ unban(user: User): Promise<void>

Parameters#

NameType
userUser

Returns: Promise<void>

Defined in: objects/subreddit/small.ts:240


unmute#

â–¸ unmute(user: User): Promise<void>

Parameters#

NameType
userUser

Returns: Promise<void>

Defined in: objects/subreddit/small.ts:211


widgets#

â–¸ widgets(): Promise<Widgets>

Returns: Promise<Widgets>

Defined in: objects/subreddit/small.ts:79