Every 5 minutes
Remove spam and scams from your server
Clear spam is deleted within minutes, and borderline messages go to your mods to decide.
- Runs
- Every 5 minutes
- Apps
- Discord
- AI
- Yes, uses the built-in AI allowance
- Access
- Read Message History, Manage Messages, Message Content intent
Send this to your assistant
Create a ClickRuntime automation: every 5 minutes, check new messages in my Discord's public channels, delete clear spam or scam links, and post anything borderline to #mod-queue.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A crypto-adjacent or gaming Discord server is a magnet for fake giveaway links, wallet-drainer messages and invite spam, and the scammers post when moderators are asleep. One convincing message that sits for six hours can cost a member their savings, and the server's reputation takes the hit. Volunteers cannot read every channel around the clock, and word filters either miss clever wording or delete harmless posts.
Every five minutes the automation fetches messages posted since the last check and ClickRuntime's built-in AI classifies each one as clean, obvious spam or borderline. Obvious spam is deleted. Borderline cases are posted to a moderator channel with the message, its author and the channel it appeared in, so a person always makes the final call.
Servers with open invites, active trading chat or younger members are the usual users.
What you get out of it
Scams removed in minutes, not hours
A fake airdrop link is dangerous in the first hour, when most people see it. A five-minute sweep takes it down long before the evening crowd arrives, which protects members who would otherwise click.
Moderators see only the hard cases
Obvious junk disappears without anyone looking. The borderline posts land in a single channel, so moderators spend their limited time on judgment calls instead of scrolling every channel for spam.
Smarter than a word filter
The AI reads the whole message, so a scam written around a banned word, or a normal message that happens to include one, is judged by what it actually says rather than a keyword list.
Overnight cover for volunteer teams
Most servers are moderated by people in a few time zones. Automated sweeps cover the gaps, so a spam burst at 4 a.m. is dealt with while the team sleeps.
A trail of what was removed
Because borderline posts are shown to moderators and runs are logged, you can review why something was removed and tighten the rules if the AI is too strict or too lenient.
How it works
What happens, step by step
Every 5 minutes, ClickRuntime reads new messages in the Discord channels you chose.
AI checks each one and decides whether it is spam, a scam or fine.
Obvious spam is deleted straight away.
Borderline messages are posted to your mod queue channel with the author and text, so a moderator can decide.
Before it runs live
- Connect Discord
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other Discord steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_trigger, http, credentials, ai, state, report_fetched
CHANNELS = ["GENERAL_CHANNEL_ID", "INTROS_CHANNEL_ID"]
MOD_QUEUE = "MOD_QUEUE_CHANNEL_ID"
def discord(method, path, **kw):
r = http.request(method, f"https://discord.com/api/v10{path}",
headers={"Authorization": f"Bot {credentials.secret('DISCORD_BOT_TOKEN')}"}, **kw)
r.raise_for_status()
return r.json() if r.content else None
@on_trigger
def run(event):
after = state.get("after") or {}
msgs = []
for cid in CHANNELS:
batch = discord("GET", f"/channels/{cid}/messages", params={"limit": 50, **({"after": after[cid]} if cid in after else {})})
if batch:
after[cid] = batch[0]["id"]
msgs += [(cid, m) for m in batch if not m["author"].get("bot")]
report_fetched(len(msgs))
if not msgs:
return {"checked": 0}
state.set("after", after)
lines = "\n".join(f"{i}. {m['content'][:300]}" for i, (_, m) in enumerate(msgs))
labels = ai.generate(f"Label each message spam, borderline or ok, one per line:\n{lines}", max_output_tokens=len(msgs) * 6).text.split()
for (cid, m), label in zip(msgs, labels):
if label.startswith("spam"):
discord("DELETE", f"/channels/{cid}/messages/{m['id']}")
elif label.startswith("borderline"):
discord("POST", f"/channels/{MOD_QUEUE}/messages", json={"content": f"<#{cid}> {m['author']['username']}: {m['content'][:1500]}"})
return {"checked": len(msgs)}FAQ
Common questions
Will it delete legitimate messages by mistake?
What permissions does the Discord bot need?
Does it catch scam links posted as images?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Answer questions in your help channel
People who mention your bot in #help get an answer within minutes, and bug reports are copied to the right channel.
See how it worksShare new YouTube videos with a short summary
When a channel you follow uploads, your server gets the link and a three-line summary.
See how it worksGet a daily news digest in Discord
Each morning your server gets a short roundup of the top stories from the sites you follow.
See how it worksKeep exploring
Set up “Remove spam and scams from your server” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.