Block the author of an item.
The ID of the item to block the author of.
A promise that resolves when the request is complete.
Apparently this only works if the item is in modmail or the user's inbox, and if it's not the request silently succeeds anyway.
Crosspost a post.
The ID of the post to crosspost.
The name of the subreddit to crosspost to.
The title of the crosspost.
Any extra options.
A promise that resolves to the ID of the newly created post.
Get the duplicates of a post.
This is the mechanism that drives the "View discussions in X other communities" button on Reddit.
The ID of the post to get duplicates of.
A promise that resolves to a listing of posts.
Ignore any future reports of an item.
The ID of the item to ignore reports for.
A promise that resolves when the setting has been changed.
This requires the authenticated user to be a moderator of the
subreddit with the posts
permission.
Remove an item, optionally marking it as spam.
The ID of the item to remove.
Whether or not to mark this item as spam. Defaults to false.
A promise that resolves when the item has been removed.
This requires the authenticated user to be a moderator of the
subreddit with the posts
permission.
Report an item to the mods.
The report will be anonymous if you are not a mod of the subreddit. If you are a mod the report will be tied to your username.
The ID of the item to report.
Optional
reason: stringThe reason you are reporting the item.
A promise that resolves when the item has been reported.
Search Reddit.
The search query.
The subreddit to search in.
The time range to search in.
The way to sort the search results.
The search syntax to use.
Whether or not to restrict the search to the
given subreddit. If this is false
or if subreddit
is falsy this will
search all of Reddit.
A listing of posts.
Due to the way Reddit implements Listings, this will only contain the first 1000 posts.
Set the suggested sort for a post.
The ID of the post to update the suggested sort for.
The new suggested sort. If this is undefined
the sort will be
cleared.
A promise that resolves when the post's suggested sort has been updated.
Unignore any future reports of an item.
The ID of the item to unignore reports for.
A promise that resolves when the setting has been changed.
This requires the authenticated user to be a moderator of the
subreddit with the posts
permission.
Generated using TypeDoc
Various methods to allow you to interact with posts.