Skip to content

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.

Paste it into your assistant. It tells you what it will send or change before it runs live.

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

  1. Every 5 minutes, ClickRuntime reads new messages in the Discord channels you chose.

  2. AI checks each one and decides whether it is spam, a scam or fine.

  3. Obvious spam is deleted straight away.

  4. 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

RunsEvery 5 minutes
Remove spam and scams from your servertoday, 9:00Succeeded
Discord · #mod-queue#general newuser42: Free Nitro for the first 100 people, claim here: bit.ly/...

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
ai_spam_and_scam_moderation.pyexample
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?
Only messages the AI considers obvious spam are deleted. Anything uncertain goes to the moderator channel instead, where a person decides. If you find it too aggressive, you can tell your AI assistant to send more categories to review rather than delete them.
What permissions does the Discord bot need?
The bot needs permission to read message history and to manage messages in the channels it patrols, plus permission to post in the moderator channel. Without Manage Messages, deletion fails, and the run log will show which channel was refused.
Does it catch scam links posted as images?
It reads message text and link addresses, not the contents of images. A scam sent only as a screenshot may slip through, though a message with an image and suspicious wording is still judged on the words that accompany it.
What permissions does it need?
Read Message History, Manage Messages, Message Content intent. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

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.