Skip to content

feat: integrate Discord bot and automate GitHub notifications - #213

Merged
hi0001234d merged 4 commits into
hi0001234d:mainfrom
yagnik06:main
Nov 27, 2026
Merged

hi0001234d merged 4 commits into
hi0001234d:mainfrom
yagnik06:main

Conversation

@yagnik06

Copy link
Copy Markdown
Contributor
  1. Added a new Discord bot package to the project and implemented a GitHub notification workflow to automatically send repository updates and activity notifications to Discord.

  2. This integration improves communication by keeping the Discord community informed about important GitHub events and repository activity.

yagnik06 and others added 4 commits November 25, 2026 17:54
- discord-bot/: standalone TypeScript package (discord.js v14 + Express)
  with 16 slash commands, welcome messages, server study reports,
  moderation tools, and HMAC-verified GitHub webhook listener
- .github/workflows/discord-notify.yml: serverless GitHub Actions
  notifications (stars/issues/PRs) via actions/github-script TypeScript
- Channel IDs stored as strings to avoid snowflake precision loss

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@yagnik06

Copy link
Copy Markdown
Contributor Author

Summary

Adds an isolated Discord bot package and a serverless GitHub → Discord notification workflow.

What's included

discord-bot/ — standalone TypeScript package (discord.js v14 + Express):

  • 16 slash commands: /ping /serverinfo /userinfo /help, /nexpath /rules, /joke /quote /formatcode, /study, /announce /purge /slowmode, /set_githu b_channel /github_status /test_github_event
  • Welcome messages, interactive buttons, server audit reports
  • HMAC-verified GitHub webhook listener (Express, port 5000)

.github/workflows/discord-notify.yml — zero-server notifications via actions/github-script:

  • ⭐ Stars, 🐛 Issues, 🔀 PRs (opened/merged/closed) → Discord channel
  • Skips gracefully when DISCORD_WEBHOOK_URL secret isn't configured (fork PRs stay green)

Isolation & safety

  • Own package.json/tsconfig.json — does not affect nexpath-cli deps or dist/ output (npm files: ["dist"] untouched)
  • No secrets committed: .env, github_config.json, runtime artifacts all gitignored
  • Discord IDs stored as strings (snowflake precision-safe)

Verification

  • tsc --noEmit clean, npm run build passes
  • Root suite: 508 files / 13,823 tests passing
  • Bot tested live: online, commands synced, test event delivered
  • Workflow script verified for all 6 event types

@hi0001234d

Copy link
Copy Markdown
Owner

Review: Approved

Reviewed the full diff — clean work, well-scoped, and safely isolated.

What I checked

  • *Isolation: discord-bot/ has its own package.json/tsconfig — zero impact on nexpath-cli build, deps, or published dist/. Verified files: ["dist"] unchange
    d.
  • Secrets hygiene: .env, github_config.json_, study reports, nodemodules/, dist/ all properly gitignored. Only .env.example (placeholders) is tracked. No toke
    ns or credentials in the diff.
  • Workflow correctness: discord-notify.yml runs plain JS under github-script@v7 (no TS syntax), skips cleanly when DISCORD_WEBHOOK_URL is unset so fork PRs don't
    fail, and produces correct payloads for all 6 event types (star, issue open/close, PR open/merge/close-unmerged).
  • Code quality: Discord snowflake IDs handled as strings (avoids the Number.MAX_SAFE_INTEGER precision bug), permission checks are safe against API member shapes, dep
    recation warnings addressed (MessageFlags.Ephemeral).
  • Verification*: typecheck clean, build passes, 13,823 root tests green, bot verified live end-to-end.

    Notes (non-blocking)

  • package-lock.json isn't committed for discord-bot/ (repo convention ignores lockfiles) — fine, just means non-reproducible installs.
  • Webhook listener needs a public URL to receive GitHub events — documented in README; Actions path needs none.
    merging. 🚀

@hi0001234d
hi0001234d merged commit 5db5a64 into hi0001234d:main Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants