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
110 changes: 47 additions & 63 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,87 +1,71 @@
# ============================================================
# =====================================================
# OmegaBot Environment Configuration
# ============================================================
#
# =====================================================
# Copy this file to `.env` and fill in real values.
# NEVER commit `.env` with secrets.
#
# ============================================================
# Discord (required)
# ============================================================
# Do NOT commit your actual `.env` file.
# =====================================================

# Bot authentication token used to connect to Discord

# -----------------------------------------------------
# Discord (REQUIRED)
# -----------------------------------------------------

# Bot authentication token
DISCORD_TOKEN=your-discord-bot-token-here

# Application ID required for slash command registration
DISCORD_APP_ID=your-discord-application-id
# Discord Application ID (used for slash command registration)
DISCORD_APP_ID=your-discord-app-id-here

# Guild ID where commands are registered during development
DISCORD_GUILD_ID=your-discord-guild-id-here


# -----------------------------------------------------
# Logging
# -----------------------------------------------------

# Log level:
# debug | info | warn | error
LOG_LEVEL=debug

# Pretty-print logs in development (requires pino-pretty)
# Set to false in production for JSON logs
LOG_PRETTY=true

# Guild where development slash commands are registered
# (guild commands update instantly)
DISCORD_GUILD_ID=your-discord-guild-id
# Standard Node environment flag
# development | production
NODE_ENV=development


# ============================================================
# -----------------------------------------------------
# Summaries
# ============================================================
# -----------------------------------------------------

# Summary mode:
# - "local" → simple local summarizer (default)
# - "llm" OpenAI-powered summaries
# - local : rule-based summary (default, no API key needed)
# - llm : OpenAI-powered summary
SUMMARY_MODE=local

# OpenAI API key
# Required ONLY when SUMMARY_MODE=llm
OPENAI_API_KEY=your-openai-key-if-needed
# Required only when SUMMARY_MODE=llm
OPENAI_API_KEY=your-openai-api-key-here


# ============================================================
# -----------------------------------------------------
# GitHub Integration
# ============================================================

# Personal Access Token (PAT) for GitHub REST API
#
# Required for:
# - Issue lookup
# - Pull request lookup
# - PR announcements
#
# Fine-grained token recommended.
# Minimum permissions:
# - Contents: Read
# - Pull requests: Read
# - Issues: Read
GITHUB_TOKEN=your-github-pat-here


# ============================================================
# GitHub PR Announcements (optional)
# ============================================================
# -----------------------------------------------------

# Default GitHub repo owner/org for PR polling
# Example: NickTheDevOpsGuy
GITHUB_OWNER=your-github-owner
# Personal Access Token for GitHub REST API
# Required for issue lookup, PR lookup, and PR polling
GITHUB_TOKEN=your-github-pat-here

# Repository name for PR polling
# Example: OmegaBot
# Default repo configuration for PR polling (optional)
GITHUB_OWNER=your-github-org-or-username
GITHUB_REPO=your-repo-name

# Discord channel ID where PR announcements will be posted
#
# IMPORTANT:
# This must be a numeric channel ID, not a channel name.
# Enable Developer Mode in Discord → right-click channel → Copy ID
# Enable Developer Mode in Discord to copy channel IDs
GITHUB_ANNOUNCE_CHANNEL_ID=your-discord-channel-id


# ============================================================
# GitHub PR Polling Interval
# ============================================================

# Polling interval in milliseconds
#
# Examples:
# 60000 → every 1 minute
# 300000 → every 5 minutes
#
# Defaults to 60000 (1 minute) if not set
# Poll interval for GitHub PR announcements (milliseconds)
# Default: 60000 (60 seconds)
GITHUB_POLL_INTERVAL_MS=60000
221 changes: 3 additions & 218 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,221 +1,6 @@
<p align="center">
<img src="assets/banner.png" alt="OmegaBot Banner" width="900">
</p>

<p align="center">
<img src="https://img.shields.io/github/last-commit/NickTheDevOpsGuy/OmegaBot">
<img src="https://img.shields.io/github/license/NickTheDevOpsGuy/OmegaBot">
<img src="https://img.shields.io/badge/node-18+-blue">
<img src="https://img.shields.io/badge/made%20with-JavaScript-yellow">
</p>

# OmegaBot

OmegaBot is a modular Discord bot designed to support development projects with quick summaries, FAQs, GitHub lookups, and automated notifications. The structure is clean and fully service based which makes it easy to extend.

---

## Features

Current features

- Modular slash-command system (auto-loaded from dist/commands)
- /ping command for testing
- /summary command with local summarizer and optional LLM mode (via SUMMARY_MODE)
- /history command that DMs recent channel history (with file fallback for long output)
- Shared transcript builder + consistent transcript defaults
- Command registration script for fast guild iteration

Planned features

- FAQ storage and quick lookup
- GitHub issues and pull request lookups
- Pull request announcements
- Pagination for large history/playback (buttons or follow-ups)
- Per-user timezone support (store IANA timezone and apply to transcripts)
- Improved summary output (highlights, action items, structured sections)

---

## Documentation

- 📘 [Command Reference](docs/commands.md)
- 🧠 [Transcript & Summary Design](docs/transcripts.md)
- 🛠️ [Development Notes](docs/dev-notes.md)

---

## Getting Started

### Requirements

- Node 18 or newer
- A Discord bot token
- A development server where you have Manage Server permissions

### Setup

Clone the repo:

```bash
git clone https://github.com/NickTheDevOpsGuy/OmegaBot.git
cd OmegaBot
```

Install dependencies:

```bash
npm install
```

Create a `.env` file based on `.env.example`:

```
DISCORD_TOKEN=your_token_here
DISCORD_APP_ID=your_application_id
DISCORD_GUILD_ID=your_guild_id
SUMMARY_MODE=local
```

### Register Slash Commands

```bash
npm run register
```

### Run the Bot

```bash
npm run dev
```

You should see:

```
OmegaBot is online
```

---

## Project Structure

<details>
<summary>📁 Click to expand file structure</summary>

```
.
├── .env
├── .github
│ ├── ISSUE_TEMPLATE
│ │ ├── bug.yml
│ │ ├── config.yml
│ │ ├── documentation.yml
│ │ ├── enhancement_refactor.yml
│ │ ├── feature_request.yml
│ │ └── question_discussion.yml
│ ├── pull_request_template.md
│ └── workflows
│ └── OmegaBot.yml
├── .gitignore
├── .husky
│ ├── pre-commit
│ └── pre-push
├── .prettierignore
├── .prettierrc.yml
├── assets
│ ├── banner.png
│ └── omegabot.png
├── CONTRIBUTORS.md
├── data
│ └── timezones.json
├── docs
│ ├── commands.md
│ ├── dev-notes.md
│ └── transcripts.md
├── eslint.config.ts
├── LICENSE
├── package-lock.json
├── package.json
├── README.md
├── scripts
│ └── precheck.sh
├── src
│ ├── bot.ts
│ ├── commands
│ │ ├── general
│ │ │ └── ping.ts
│ │ ├── github
│ │ │ ├── gh.ts
│ │ │ └── pr.ts
│ │ ├── history
│ │ │ └── history.ts
│ │ ├── pagination
│ │ │ └── pagination.ts
│ │ ├── playback
│ │ │ └── playback.ts
│ │ └── summary
│ │ └── summary.ts
│ ├── config
│ │ └── env.ts
│ ├── registerCommands.ts
│ └── services
│ ├── discord
│ │ ├── commandLoader.ts
│ │ ├── fetchChannelMessages.ts
│ │ └── interactionHandler.ts
│ ├── github
│ │ ├── githubApi.ts
│ │ ├── githubClient.ts
│ │ ├── lastSeenStore.ts
│ │ ├── prFormatter.ts
│ │ ├── prPoller.ts
│ │ └── types.ts
│ ├── summary
│ │ ├── llmSummary.ts
│ │ ├── localSummary.ts
│ │ └── summarizer.ts
│ ├── time
│ │ ├── formatTimestamp.ts
│ │ └── validateTimezone.ts
│ ├── timezone
│ │ ├── timezone.ts
│ │ └── timezoneStore.ts
│ └── transcript
│ ├── buildTranscript.ts
│ └── defaults.ts
└── tsconfig.json
```

</details>

---

## Extending OmegaBot

OmegaBot is designed for small, focused modules. To add new features:

1. Create a new command file under `src/commands/<category>/`
2. Add any logic needed inside `src/services/<feature>/`
3. Run `npm run register` to publish new slash commands

---

## Contributors

Thanks to everyone who has helped build or improve OmegaBot.

<a href="https://contrib.rocks/image?repo=NickTheDevOpsGuy/OmegaBot">
<img src="https://contrib.rocks/image?repo=NickTheDevOpsGuy/OmegaBot" alt="Contributors">
</a>

Generated using https://contrib.rocks

To learn how to contribute, read the [CONTRIBUTOR.md](CONTRIBUTOR.md) file.

If you would like to contribute, please open an issue or submit a pull request.

---

## License
OmegaBot is a modular Discord bot designed to support development projects with quick summaries, GitHub lookups, and automated notifications.

MIT License. Use and modify freely.
See the repository for full documentation:
https://github.com/NickTheDevOpsGuy/OmegaBot
Loading
Loading