MemeBot is a self-hosted Discord bot that posts memes from a public source on a schedule.
It is built for simple setup:
- configure everything from Discord slash commands
- no local media storage
- duplicate protection before download
- supports public folders and direct media links
You need:
- a Discord server where you can manage bots and channels
- a Discord application with a bot token
- the bot invited with
botandapplications.commandsscopes - channel permissions to
Send Messages,Attach Files, andUse Application Commands
For the easiest setup, use Docker:
- Docker
- Docker Compose
For a local run instead of Docker:
- Go
1.26+
If you do not already have one:
- Open the Discord Developer Portal
- Create a new application
- Open the
Bottab and create a bot user - Copy the bot token
- Open
OAuth2 -> URL Generator - Select the
botandapplications.commandsscopes - Invite the bot to your server
Copy .env.example to .env and set your token:
BOT_TOKEN=your-bot-tokenThat is the only required environment variable.
On Windows:
scripts\build-docker.bat
docker compose up -dOn Linux:
./scripts/build-docker.sh
docker compose up -dFor a local run without Docker:
go run ./cmd/memebotAfter the bot comes online, configure it from your server with these slash commands:
/set-channel- choose where memes will be posted/set-timeout- set how often the bot posts a meme/set-source- set the source URL for memes/stop- stop posting without deleting saved settings/status- show the current bot state
The command accepts up to 3 numbers separated by spaces:
SSMM SSHH MM SS
Examples:
305 301 0 0
/set-source currently supports:
- direct media URLs
- public Google Drive folders
- public Yandex Disk folders
- generic
HTML,XML,JSON, orTXTlistings with file links
For Google Drive and Yandex Disk, nested folders are supported.
Supported media formats include common Discord-previewable files such as:
mp4gifpngjpgjpegwebpwebmmov
Archive links are rejected on purpose.
By default the bot stores its state in:
data on Windows
/data on Linux
Set MEMBOT_DATA_DIR to override that path.
The folder is created automatically if it does not exist.
What is stored there:
- saved bot settings
- sent history for duplicate prevention
- source catalog cache
The media files themselves are not stored on disk.
With Docker Compose, ./data from the repository is mounted into ${MEMBOT_DATA_DIR:-/data} inside the container.
- The bot works only inside Discord servers, not in direct messages
- Configuration commands are admin-only
- Docker Compose is the recommended production setup
- Extra optional settings are described in
.env.example
See LICENSE.