GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - hra42/lethe: Lethe is a lightweight, automated tool written in Go that periodically cleans up Discord channels by deleting messages older than a specified time threshold (e.g., 30 days old). It is designed to be easily deployed via Docker or as a standalone binary to keep Discord servers uncluttered.

BranchesTags
Open more actions menu

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
docker-compose.yml
docker-compose.yml
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
lethe.jpg
lethe.jpg
 
 
main.go
main.go
 
 

Repository files navigation

lethe

lethe

Auto-deletes Discord messages older than a configurable threshold from one or more channels.

Environment Variables

Variable Required Default Description
DISCORD_TOKEN yes — Bot token
CHANNEL_IDS yes — Comma-separated channel IDs
MAX_AGE yes — Message age threshold (e.g. 720h, 168h)
SCHEDULE no 0 */6 * * * Cron expression(s), semicolon-separated for multiple (e.g. 0 3 * * *;0 15 * * *)
TZ no UTC Timezone for schedules (e.g. Europe/Berlin)

Quick Start

Docker Compose

cp .env.example .env
# edit .env with your values
docker compose up -d

Without Docker

go build -o lethe .
DISCORD_TOKEN=... CHANNEL_IDS=123,456 MAX_AGE=720h ./lethe

Discord Bot Setup

  1. Create an application at https://discord.com/developers/applications
  2. Go to Bot → copy the token → set as DISCORD_TOKEN
  3. Go to OAuth2 → URL Generator → select scope bot
  4. Select permissions: Manage Messages, Read Message History
  5. Open the generated URL to invite the bot to your server

How It Works

  • On start, immediately deletes all messages older than MAX_AGE
  • Then repeats every INTERVAL
  • Messages < 14 days old are bulk-deleted (up to 100 per API call)
  • Messages >= 14 days old are deleted individually (Discord API limitation)
  • Supports multiple channels via comma-separated CHANNEL_IDS
  • Shows as online in Discord with "Watching cleanup" status

License

Unlicense

About

Lethe is a lightweight, automated tool written in Go that periodically cleans up Discord channels by deleting messages older than a specified time threshold (e.g., 30 days old). It is designed to be easily deployed via Docker or as a standalone binary to keep Discord servers uncluttered.

Topics

auto-deletediscorddiscord-botdockergogolangmessage-cleanup

Resources

Readme
Unlicense
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.