From ec57015d5fcbbdb0bd624e0e6186cc01768165d1 Mon Sep 17 00:00:00 2001 From: salmon Date: Thu, 13 Aug 2026 01:28:08 +0200 Subject: Unsloppify the README.md --- README.md | 39 ++++++--------------------------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 7a8d638..d79dcbf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Timeoutinator -A Discord bot that instantly **timeouts** anyone who posts in a configured channel and **purges** all of their messages from the last 24 hours. +Get rid of spammers with this one shrimple trick. ## How it works @@ -10,21 +10,7 @@ A Discord bot that instantly **timeouts** anyone who posts in a configured chann Bots, system messages, and webhook messages are ignored. The bot's own messages are also ignored. Concurrent handling of the same user is deduplicated so rapid-fire spam doesn't cause duplicate timeouts or purge races. -## Setup - -### 1. Create a Discord Application - -1. Go to [discord.com/developers/applications](https://discord.com/developers/applications) -2. Click **New Application** → name it → **Bot** tab → **Add Bot** -3. Under the bot, click **Reset Token** and copy the token — this is your `DISCORD_TOKEN` - -### 2. Enable Required Intents - -In the **Bot** tab, scroll to **Privileged Gateway Intents**. -The bot only needs **Message Content** if you want to read message content — by default, only `GUILD_MESSAGES` is required, which is non-privileged. No privileged intents are required. - -### 3. Invite the Bot - +## Quickly invite the bot: Use this URL (replace `YOUR_BOT_CLIENT_ID` with the bot's Client ID from the **General Information** tab): ``` @@ -40,25 +26,12 @@ Required permissions (encoded in the URL): | Manage Messages | Delete messages via bulk-delete endpoint | | Moderate Members | Apply timeouts | -### 4. Run +### Run ```bash -cp .env.example .env # or export the env vars directly -# edit .env with your token and target channel ID +cp .env.example .env +# edit the .env cargo run --release ``` - -## Environment Variables - -| Variable | Required | Default | Description | -|-----------------------|----------|---------|----------------------------------------------------------------| -| `DISCORD_TOKEN` | ✅ | — | Bot token from the Discord Developer Portal | -| `TARGET_CHANNEL_ID` | ✅ | — | Snowflake ID of the channel to police (right-click → Copy ID) | -| `TIMEOUT_MINUTES` | ❌ | `60` | Timeout duration in minutes (1–40320, i.e. up to 28 days) | -| `PURGE_HOURS` | ❌ | `24` | How far back (hours) to look when deleting messages | - -## Requirements - -- Rust 1.85+ (edition 2024) -- Network access (to fetch crates and connect to Discord's gateway) +Use systemd/rc.d/docker/whatever the fuck you want for persistence. -- cgit v1.2.3