Skip to main content

Reddit/moderation

@webframp/reddit/moderationv2026.05.24.1· 7d agoMODELS
01README

Reddit moderation model for subreddit management.

Reddit moderation API wrapper providing modqueue inspection, user reports, moderator action logs, content listing, and moderation actions (approve, remove, ban, modmail, flair). Designed for automated moderation pipelines. Authentication via Reddit OAuth2 script app flow with credentials stored in swamp vault.

Quick Start

swamp extension pull @webframp/reddit/moderation
swamp model create @webframp/reddit/moderation reddit-mod \
  --global-arg subreddit=aoe4 \
  --global-arg clientId=vault://reddit/clientId \
  --global-arg clientSecret=vault://reddit/clientSecret \
  --global-arg username=vault://reddit/username \
  --global-arg password=vault://reddit/password \
  --global-arg userAgent="swamp:aoe4mod:v1.0 (by /u/yourbot)"
swamp model method run reddit-mod get_modqueue
02Models1
@webframp/reddit/moderationv2026.05.24.1reddit/moderation.ts

Global Arguments

ArgumentTypeDescription
subredditstringSubreddit name (without r/ prefix)
clientIdstringReddit OAuth2 application client ID
clientSecretstringReddit OAuth2 application client secret
usernamestringReddit account username
passwordstringReddit account password
userAgentstringUser-Agent string for Reddit API requests (e.g. 'swamp:modbot:v1.0 by /u/yourname')
fn get_modqueue(type: enum, limit: number)
Retrieve items in the moderation queue pending review (posts, comments, or all)
ArgumentTypeDescription
typeenumFilter modqueue by item type
limitnumberMaximum number of items to return
fn get_reports(limit: number)
Retrieve user-reported content awaiting moderator action
ArgumentTypeDescription
limitnumberMaximum number of reported items to return
fn get_modlog(action?: string, mod?: string, limit: number)
Retrieve the moderator action log, optionally filtered by action type or moderator
ArgumentTypeDescription
action?stringFilter by action type (e.g. removecomment, approvelink, banuser)
mod?stringFilter by moderator username
limitnumberMaximum number of log entries to return
fn list_comments(sort: enum, limit: number)
List recent comments in the subreddit
ArgumentTypeDescription
sortenumSort order for comments
limitnumberMaximum number of comments to return
fn list_posts(sort: enum, limit: number)
List posts in the subreddit by sort order
ArgumentTypeDescription
sortenumSort order for posts
limitnumberMaximum number of posts to return
fn get_user_info(username: string)
Retrieve information about a specific Reddit user
ArgumentTypeDescription
usernamestringReddit username to look up
fn approve(thingId: string)
Approve a post or comment from the modqueue
ArgumentTypeDescription
thingIdstringReddit fullname of the item to approve (e.g. t3_abc123 or t1_xyz789)
fn remove(thingId: string, spam: boolean, modNote?: string)
Remove a post or comment (with optional reason and mod note)
ArgumentTypeDescription
thingIdstringReddit fullname of the item to remove (e.g. t3_abc123 or t1_xyz789)
spambooleanMark as spam (default: false)
modNote?stringInternal mod note (up to 100 chars)
fn ban_user(username: string, duration?: number, banReason?: string, modNote?: string)
Ban a user from the subreddit
ArgumentTypeDescription
usernamestringReddit username to ban
duration?numberBan duration in days (omit for permanent)
banReason?stringReason shown to the banned user
modNote?stringInternal moderator note
fn send_modmail(to: string, subject: string, body: string)
Send a modmail message to a user (repeat calls create new data versions per recipient)
ArgumentTypeDescription
tostringRecipient username
subjectstringMessage subject
bodystringMessage body (markdown supported)
fn flair_post(thingId: string, flairTemplateId: string)
Apply a flair template to a post
ArgumentTypeDescription
thingIdstringReddit fullname of the post to flair (e.g. t3_abc123)
flairTemplateIdstringFlair template ID to apply

Resources

modqueue(infinite)— Items pending moderator review (posts and comments)
reports(infinite)— User-reported content awaiting moderator action
modlog(infinite)— Moderator action log entries
comments(infinite)— Subreddit comments
posts(infinite)— Subreddit posts
user_info(infinite)— Information about a specific Reddit user
action(infinite)— Result of a moderation action (approve, remove, ban, modmail, flair)
03Previous Versions1
2026.05.23.1May 24, 2026
04Stats
A
100 / 100
Downloads
1
Archive size
18.5 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms
06Labels