Download Scotch Egg
The bot is completely free and open-source. Choose how you would like to download the files below to get started.
đĻ
Download ZIP
Recommended for most users. Simply download the source code as a ZIP file, extract it to a folder on your computer, and you're ready to proceed to the setup guide.
Download Latest Versionđģ
Git Clone
For advanced users and developers. Clone the repository directly to your machine or VPS using Git to easily pull future updates.
git clone https://github.com/verdantly/scotch-egg-bot.git
Got the files?
Once you have the bot's files on your computer, you're ready to add your credentials and turn it on!
Continue to the Setup Guide âĄī¸Changelog
Keep track of all new features, fixes, and improvements to Scotch Egg.
v1.5.2
Fixed Bug Fixes
- Recurring Event Public Reminder Cleanup: Resolved a bug in
/settings cleanupwhere orphaned public reminder pings for past occurrences of recurring events were not deleted because they shared the same name as upcoming occurrences. The bot now extracts and matches the unique Discord start timestamp tag (<t:TIMESTAMP:F>) to safely distinguish and clean up only the concluded occurrence.
v1.5.1
May 30, 2026Changed Improvements
- Always Delete Public Reminders on Conclusion: Refactored the reminder archiving logic to always delete public reminder messages entirely on event conclusion, regardless of whether
autoDeleteis enabled or disabled. This leaves only the main, low-contrast event announcement message in the channel, significantly reducing chat history clutter.
Fixed Bug Fixes
- Concluded Event Archiving in Settings Cleanup: Fixed a bug where concluded event announcements were not being archived or deleted during
/settings cleanupif they were still tracked ineventDbbut missing theirmessageIdfield.archiveAnnouncementMessagenow accepts an optional pre-fetched message parameter to ensure it can archive the message directly and safely populatemessageId. - Regional Locale Normalization: Fixed a major internationalization bug where regional Discord locale tags (such as
es-ES,pt-BR,fr-FR,de-DE) bypassed localized string checks (likeuserLocale === 'es'orguildLocale === 'pt'), causing the bot's messages, settings menus, and logs to fall back to English. Systematic locale normalization now handles all raw locale strings cleanly. - Multilingual Strike-Through Matching: Replaced hardcoded English text regexes (
**Time:**and**Location:**) with language-agnostic emoji-based matching ((đī¸ \*\*.*?\*\* .*?)and(đ \*\*.*?\*\* .*?)) to ensure Time and Location details are successfully struck-through on event conclusion across all five supported native languages. - Native Embed Title Strike-Through: Discord embed titles do not support standard Markdown formatting (like
~~strikethrough~~), causing literal~~tildes to be shown as raw text. Implemented native client-side strike-through rendering for titles using Unicode combining characters (U+0336). - Resilient Empty Description Status Banner: Fixed a bug where the bold status banner (e.g.
âšī¸ This event has concluded.) was omitted if the original Discord event had no description. If the description is empty, it is now cleanly set to display only the status banner.
v1.5.0
May 28, 2026Added Features
- Hybrid Reminder Mode: Introduced a new, third configuration option for server reminders (
hybrid). When enabled, the bot posts public event reminders in the configured text channel with zero user mentions/pings (preserving clean channel histories), while simultaneously dispatching private DM reminders directly to opted-in users. Enforces strict privacy by suppressing any fallback mentions in public chat if a user's DMs are closed. - Manual Concluded Event Cleanup: Added a new
/settings cleanupsubcommand (natively localized across English, Spanish, German, French, and Portuguese). It scans the last 100 messages of the announcement channel, matches orphaned announcements using the unique Discord event URL, and automatically archives or deletes them to conform to server settings. - Offline Startup Auto-Archiving: Upgraded the
Events.ClientReadyoffline garbage collection routine to fetch live event statuses and dynamically archive or delete announcements of events that concluded while the bot was offline, preventing orphaned announcements from ever accumulating. - Automatic Database Self-Healing: Implemented a robust, dual-layer resilience mechanism in
storage.jsto prevent data loss. The system automatically maintains atomic.bakbackup files for both events and configs. If a primary database file fails to load due to truncation or corruption, it seamlessly falls back to the backup. If both files are damaged, it engages a recursive, Regex-based partial JSON salvage utility to extract intact records and automatically reconstructs the database structure. - Multi-Language (Localization) Support: Integrated comprehensive localization support for 5 major native locales: English (
en), Spanish (es), German (de), French (fr), and Portuguese (pt). Implemented localized name and description metadata for all slash commands indeploy-commands.js. Createdi18n.jsto dynamically translate event announcements, button labels, select menus, DMs, reminders, and interactive UI feedback on the fly using user client or guild locale preferences. - Native Event Link Button: Implemented a new link button (
View Event) on all event announcements, public reminders, private DM reminders, and settings previews. This button links directly to the Discord native scheduled event window, eliminating the need to embed the URL in message text and preventing Discord from rendering a duplicate "double embed."
Changed Improvements
- Dynamic Help Slash Command: Customized the
/helpcommand to conditionally display the list of Administrator commands only if the command is executed by a user with Administrator permissions. The/settings testreminderfooter tip is also dynamically hidden for non-administrators. - Help Attribution Link: Added a subtle powered-by attribution link pointing to the GitHub repository within the
/helpcommand description embed.
Fixed Bug Fixes
- Interaction Syntax Error: Fixed a critical
SyntaxError: Unexpected token 'catch'startup crash inindex.jscaused by a truncated button interaction handler. - Mention-Stripping Regex Bug: Resolved a bug in the event archiver where secondary user mentions left trailing
>characters and third/subsequent mentions were not stripped during event archival, cluttering archived chat histories. - Multilingual Footer Stripping: Generalized the opt-in footer-stripping regex to correctly match and remove opt-in text in all five supported languages when archiving announcements.
- Discord Description Length Constraint: Fixed an
ExpectedConstraintErrorduring command deployment by shortening the French and Portuguese slash command description localizations to stay strictly under Discord's 100-character API limit. - Database Loading Metadata Loss: Fixed a critical bug in
storage.jswhereguildIdandreminderMessageIdswere lost upon bot restart. This restores full capability to modify, clean up, and strip mentions from older public reminders upon event conclusion after a reboot. - Startup Garbage Collection Wipeout: Fixed a critical edge case in startup synchronization where a single guild sync failure (due to API timeouts or outages) would trigger a complete deletion of that guild's active reminder database records.
v1.4.0
May 26, 2026Added Features
- Rich Event Announcements: Event announcements now include start-to-end time ranges, dynamic human-readable durations (e.g.
1 hour 30 minutes), and a dedicatedđ¤ Hostfield linking to the organizer's Discord profile. - Smart Voice Channel Calendar Locations: The "Add to Calendar" link button now dynamically resolves and lists the actual voice or stage channel name (e.g.
General (Discord Voice/Stage)) in Google Calendar instead of a generic "Discord Server" location. - High-Contrast Past Event Visuals: Announcements now dynamically wrap titles in strike-throughs on conclusion (e.g.,
~~New Event: Meeting~~ [Completed]), strike-through key time/location metadata, dim descriptions using blockquotes, and prepend a bold status banner (e.g.,âšī¸ This event has concluded.). - Past Reminder Message Archiving: Added tracking for all sent public channel reminders. On event completion or cancellation, the bot dynamically edits past public reminders to remove components, strip out old user mentions (clearing blue ping highlights from the chat history), strike-through text, and prepend a bold dynamic status banner (e.g.
âšī¸ This event has completed.).
Fixed Bug Fixes
- Dynamic Relative Reminders: Shifted reminder message generation inside the scheduled node-schedule job callback, resolving an issue where the relative countdown (e.g.,
(in 1 hour)) was missing for events scheduled more than one week in advance. - DM Reminder Safe Truncation: Implemented dynamic 2,000-character safety truncation for event descriptions in DM reminders, preventing message delivery failures and bot crashes for events with very long descriptions.
v1.3.1
May 24, 2026Fixed Bug Fixes
- Memory Sweepers: Actually applied the Discord.js sweeper configuration to the client to properly clear cached messages and users, resolving an omission in the v1.3.0 release.
- Job Cancellation Efficiency: Updated the node-schedule cancellation loop to use the optimized
for...inapproach as originally intended in v1.3.0. - Missing Event Title: Fixed an issue where the "New Event: [Name]" title was missing from announcement embeds.
v1.3.0
May 20, 2026Added Features
- Rate Limiting & Cooldowns: Added a comprehensive cooldown system for slash commands, interactive buttons ("Remind Me!"), pagination, and select menus to protect against API spam and rate limits.
Changed Improvements
- Archived Event UI: When an event concludes, the archived announcement now grays out the entire description text (using blockquotes) and strips out obsolete relative timestamps for a cleaner, dimmed look.
- Counter Lookup Efficiency: The live "Remind Me! (X)" counter now uses an O(1) instant database lookup to find the event's server, significantly reducing CPU overhead.
- Batched Reminder DMs: Refactored the DM reminder system to process users in concurrent batches of 5 (with a 1-second delay), drastically speeding up large reminder blasts while safely respecting Discord's limits.
- Memory Optimization: Configured Discord.js sweepers to automatically clear cached messages and users every hour, preventing RAM bloat on low-memory devices like Raspberry Pis.
- Database Lookup Speed: Replaced standard objects with null-prototype objects (
Object.create(null)) for the event database, increasing lookup efficiency and eliminating prototype pollution vulnerabilities. - Minified Disk Writes: Database and configuration saves are now minified (whitespace removed), reducing file size and write times to further protect SD card lifespans.
- Job Cancellation Efficiency: Optimized the node-schedule job cancellation loop to use a raw
for...inloop to save event loop cycles when evaluating large sets of scheduled events.
Fixed Bug Fixes
- Silent Errors: Fixed an issue where the live counter update function was silently swallowing errors without logging them.
- Unhandled Rejection Crashes: Wrapped critical event listeners (
InteractionCreate,GuildScheduledEventUpdate, and the shutdown sequence) in robusttry...catchblocks to gracefully catch and handle unexpected network or API errors without crashing the bot container.
v1.2.0
May 17, 2026Added Features
- Configurable Reminder Intervals: Server administrators can now fully customize the timing of event reminders using the new
/settings intervalscommand (e.g.,24h, 1h, 15m). - Test Reminder Command: Added
/settings testreminderfor admins to generate an ephemeral preview of what their configured reminders will look like. - Pagination: Both
/upcomingand/myreminderscommands now support paginated navigation for servers with more than 25 active events. - Auto-Delete Concluded Events: Server administrators can now use
/settings autodeleteto choose between permanently deleting or gracefully archiving event announcements when they conclude or are canceled. - Auto-Create Discussion Threads: The bot now can automatically create a dedicated discussion thread on every new event announcement.
- Relative Timestamps: Dates in
/upcoming,/myreminders, and announcements will now show a relative countdown alongside the date and time (e.g., in 3 days) if the event is less than one week away.
Changed Improvements
- Toggleable Features: The "Add to Calendar" button and "Auto-Create Discussion Threads" features can now be toggled on or off per-server.
- Modular Architecture: Abstracted database operations and pure utility functions into dedicated
storage.jsandutils.jsfiles for a cleaner core codebase. - Performance Optimizations: The bot now utilizes concurrent API fetching (
Promise.all) and memory caching to process large reminder distributions and server syncs significantly faster. - Dynamic Reminder Buttons: Interactive buttons now intelligently hide when they are no longer useful.
Fixed Bug Fixes
- Docker Permissions: Fixed a critical bug in the
Dockerfilewhere the non-root node user lacked write permissions for the app directory. - Uncaught Exception Handling: The bot now correctly exits after logging an
uncaughtExceptioninstead of resuming with a potentially corrupted memory state. - Button URL Limit Crashes: Implemented dynamic truncation for Google Calendar links to guarantee they never exceed Discord's strict 512-character limit.
- Embed Limit Crashes: Added defensive truncation for event announcements and archival messages to prevent API errors.
- Live Counter Desynchronization: The live "Remind Me! (X)" counter on announcements now accurately updates in the background.
- Proactive Permission Checks: The
/announceeventcommand now gracefully verifies channel permissions before attempting to post.
v1.1.0
May 15, 2026Added Features
/upcomingCommand: New public command allowing users to view a list of upcoming events and easily opt in to multiple reminders at once via a dropdown menu.- Add to Calendar Button: Event announcements now include a link button to dynamically generate and add the event directly to Google Calendar.
v1.0.0
May 13, 2026Added Features
- Event Announcements via Rich Embeds.
- Opt-in Reminders with Dual Reminder Modes (Private DM or Public Pings).
- Automated Alerts precisely 24 hours and 1 hour before an event.
- Graceful Shutdown preventing data corruption.
- Admin Error Notifications.
/myremindersand/statscommands.- Live "Remind Me!" Button Counter.
Removed Changes
- Privileged Intent Requirement: The bot is now built entirely on modern slash commands and interactions, completely removing the need for the Server Members Intent.