Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,24 @@ DISCORD_WELCOME_CHANNEL_ID=
# Get it by: Server Settings → Roles → Right-click role → Copy ID
DISCORD_AUTO_ROLE_ID=

# ============================================================
# Fun Commands - Joke Moderation (OPTIONAL)
# ============================================================

# Role ID for users who can moderate jokes (remove inappropriate ones)
# Get it by: Server Settings → Roles → Right-click role → Copy ID
#
# Users with this role can use:
# - /fun joke remove <id> → Delete jokes from the database
#
# If unset, only the bot owner can remove jokes.
#
# Recommended setup:
# 1. Create a "Joke Moderator" role in your Discord server
# 2. Assign it to trusted members
# 3. Add the role ID here
JOKE_MODERATOR_ROLE_ID=

# ============================================================
# Conversation Summaries (OPTIONAL)
# ============================================================
Expand Down Expand Up @@ -226,4 +244,4 @@ LOG_PRETTY=true
# Only relevant if using database features (currently not implemented)
#
# Default: data/omegabot.db
# DATABASE_PATH=data/omegabot.db
DATABASE_PATH=data/omegabot.db
39 changes: 22 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
[2.0.0] - 2026-01-17
## [Unreleased]

### Changed
### Added

- Joke command system with generational categories (boomer, genx, millennial, genz, genalpha)
- Coin flip result tracking and statistics
- Coin flip leaderboard showing top flippers
- Playback and pagination commands
- Timezone commands (save, show, clear, compare)
- Centralized structured logging
- Initial changelog tracking

## BREAKING: Upgraded to Discord.js v14
---

- Updated all interaction handlers to use v14 API
- Fixed type narrowing issues with guild checks
- Updated permission system for v14 compatibility
- Enhanced TypeScript type safety
## [2.0.0] - 2026-01-17

### Changed

## Fixed
- **BREAKING**: Upgraded to Discord.js v14
- Updated all interaction handlers to use v14 API
- Fixed type narrowing issues with guild checks
- Updated permission system for v14 compatibility
- Enhanced TypeScript type safety

### Fixed

- Fixed TypeScript compilation errors with type narrowing
- Fixed FAQ remove command interaction handling
- Fixed permission middleware type guards
- Resolved avatar resolution to use maximum 4096px
- Fixed safeReply type compatibility issues

## Technical
### Technical

- Updated to Discord.js v14.16.3
- Improved TypeScript strict mode compliance
- Enhanced error handling in FAQ subcommands
- Better type safety across permission checks

## Unreleased

- Added
- Playback and pagination commands
- Timezone commands (save, show, clear, compare)
- Centralized structured logging
- Initial changelog tracking
68 changes: 58 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,17 @@ OmegaBot is a modular Discord bot designed to support development projects with
- Structured logging (pino)
- Welcome and onboarding flows triggered on member join (`guildMemberAdd`)
- Optional auto-role assignment for new members (`DISCORD_AUTO_ROLE_ID`)
- GitHub integration with now caching calls instead of polling, including:
- GitHub integration with 5-minute API caching (80-90% reduction in API calls), including:
- Health/status checks
- Issue and PR lookups
- New PR announcements
- Issue and PR assignee change announcements
- Issue and PR closed announcements
- Issue assignee change announcements (Issues only, PRs filtered for reduced noise)
- Issue closed announcements
- Smart notification filtering (only Issues trigger activity updates)
- Configuration and feature gating via environment variables (optional features run only when enabled)
- Per-guild configuration backed by persistent storage and admin slash commands
- **Timezone support** – Save your timezone, view it later, and compare times across locations or users
- Now all storage uses SQLite for slash commands!
- **SQLite-backed storage** – Persistent data for FAQs, jokes, fun stats, timezones, and GitHub state

### Core commands

Expand All @@ -63,7 +64,7 @@ OmegaBot is a modular Discord bot designed to support development projects with
- /faq get – retrieve FAQs by key
- /faq list – list FAQs with sorting and filtering
- /faq remove – remove FAQs with confirmation flow
- Persistent on-disk storage (versioned JSON)
- SQLite-backed persistent storage
- Usage tracking for FAQs
- Permission guardrails for destructive actions

Expand All @@ -73,7 +74,15 @@ All fun commands are available under `/fun`:

- `/fun chucknorris` – Chuck Norris facts (random, category, or search)
- `/fun dadjoke` – Random or searched dad jokes
- `/fun coinflip` – Heads or tails
- `/fun joke` – Community-submitted jokes organized by generation
- Categories: boomer, genx, millennial, genz, genalpha, random
- Add jokes, browse by category, track usage
- Moderator tools for content management
- `/fun coinflip` – Heads or tails (results tracked for stats)
- `/fun coinstats` – Coin flip statistics and leaderboards
- Track your heads vs. tails record
- View personal stats with avatar display
- See top flippers leaderboard
- `/fun dice` – Custom dice rolls
- `/fun weather` – Daily weather
- `/fun weather7` – 7-day forecast
Expand All @@ -83,8 +92,8 @@ All fun commands are available under `/fun`:

- `/docs` command for documentation lookups
- Expanded GitHub automation (labels, reviews, merge events)
- Enhanced fun leaderboard views and stats
- Improved summary output (highlights, action items, structured sections)
- Enhanced AI-powered summaries with Claude API
- Admin dashboard for bot statistics and monitoring

---

Expand Down Expand Up @@ -170,6 +179,7 @@ OmegaBot is online
- **Runtime**: Node.js 18+
- **Language**: TypeScript 5.x
- **Discord Library**: discord.js v14
- **Database**: SQLite (better-sqlite3)
- **Logging**: pino
- **Code Quality**: ESLint, Prettier
- **Git Hooks**: Husky
Expand All @@ -183,6 +193,18 @@ OmegaBot uses discord.js v14 which includes:
- Enhanced permission system
- Modern Discord API features

### Performance Optimizations

- **GitHub API Caching**: In-memory cache with 5-minute TTL
- 80-90% reduction in API calls
- Sub-millisecond response times on cache hits
- Automatic expiration and cleanup
- Rate limit protection
- **SQLite Storage**: Fast, reliable persistent data storage
- Zero-configuration database
- ACID transactions
- Efficient indexing for quick lookups

---

## Project Structure
Expand Down Expand Up @@ -222,8 +244,26 @@ OmegaBot uses discord.js v14 which includes:
│ └── OmegaBot.yml
├── .gitignore
├── .husky
│ ├── _
│ │ ├── applypatch-msg
│ │ ├── commit-msg
│ │ ├── .gitignore
│ │ ├── h
│ │ ├── husky.sh
│ │ ├── post-applypatch
│ │ ├── post-checkout
│ │ ├── post-commit
│ │ ├── post-merge
│ │ ├── post-rewrite
│ │ ├── pre-applypatch
│ │ ├── pre-auto-gc
│ │ ├── pre-commit
│ │ ├── pre-merge-commit
│ │ ├── prepare-commit-msg
│ │ ├── pre-push
│ │ └── pre-rebase
│ ├── pre-commit
│ └── pre-push
├── install-sqlite-simple.sh
├── LICENSE
├── package.json
├── package-lock.json
Expand Down Expand Up @@ -251,9 +291,14 @@ OmegaBot uses discord.js v14 which includes:
│ │ │ └── subcommands
│ │ │ ├── chucknorris.ts
│ │ │ ├── coinflip.ts
│ │ │ ├── dadjoke.ts
│ │ │ ├── dice.ts
│ │ │ ├── java.ts
│ │ │ ├── joke
│ │ │ │ ├── add.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── list.ts
│ │ │ │ ├── random.ts
│ │ │ │ └── remove.ts
│ │ │ ├── leaderboard.ts
│ │ │ ├── poll.ts
│ │ │ └── weather.ts
Expand Down Expand Up @@ -287,6 +332,7 @@ OmegaBot uses discord.js v14 which includes:
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ ├── database
│ │ │ ├── db-joke-schema.sql
│ │ │ └── db.ts
│ │ ├── discord
│ │ │ ├── commandLoader.ts
Expand Down Expand Up @@ -321,6 +367,8 @@ OmegaBot uses discord.js v14 which includes:
│ │ │ ├── prFormatter.ts
│ │ │ ├── prPoller.ts
│ │ │ └── types.ts
│ │ ├── joke
│ │ │ └── jokeStore.ts
│ │ ├── permissions
│ │ ├── roles
│ │ │ └── autoRoleHandler.ts
Expand Down
Binary file modified data/omegabot.db
Binary file not shown.
Loading