···293293- `/recache` - Recache missing files and remove items that fail after 3 attempts
294294- `/announce` - Create a new announcement (with custom text and schedule)
295295- `/announcements` - Manage existing announcements (view, edit, delete)
296296-- `/update` - Check for updates and apply them (owner only)
296296+- `/update` - Check for updates, stash changes, pull latest code, and restart bot (owner only)
297297298298### Adding Images to Queue
299299···408408- **Owner-Only**: Update command is restricted to the bot owner
409409- **Dev Mode Exclusion**: Auto-updater is disabled in development mode
410410411411-The updater runs in the background and will notify you when updates are applied.
411411+#### Update Flow
412412+413413+When an update is triggered (either automatically or via `/update` command), the bot follows this process:
414414+415415+1. **Stash Local Changes**: Any uncommitted local modifications are automatically stashed to prevent conflicts
416416+2. **Fetch Remote Changes**: Retrieves the latest commits from the remote repository
417417+3. **Check for Updates**: Verifies if there are new commits to pull
418418+4. **Pull Changes**: Applies the updates using `git pull`
419419+5. **Save Queue**: Forces a save of the current queue to disk to prevent data loss
420420+6. **Display Commit Info**: Shows the latest commit message with author and timestamp
421421+7. **Restart Bot**: Gracefully restarts the bot via PM2 with updated environment variables
422422+423423+#### Error Handling
424424+425425+Each step in the update process includes comprehensive error handling:
426426+427427+- **Stash Failures**: Reports if local changes cannot be stashed
428428+- **Fetch Failures**: Reports connection or repository access issues
429429+- **Pull Failures**: Reports merge conflicts or pull errors
430430+- **Restart Failures**: Provides instructions to manually restart if PM2 fails
431431+- **Descriptive Messages**: Each error includes specific information about what went wrong
432432+433433+The updater handles the normal PM2 `SIGINT` signal correctly and won't report it as an error during successful restarts.
412434413435### Media Recaching
414436