-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: ask ai discord bot #6842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ask ai discord bot #6842
Conversation
Signed-off-by: The-Best-Codes <[email protected]>
Signed-off-by: The-Best-Codes <[email protected]>
Signed-off-by: The-Best-Codes <[email protected]>
Signed-off-by: The-Best-Codes <[email protected]>
Signed-off-by: The-Best-Codes <[email protected]>
Signed-off-by: The-Best-Codes <[email protected]>
Signed-off-by: The-Best-Codes <[email protected]>
Signed-off-by: The-Best-Codes <[email protected]>
Signed-off-by: The-Best-Codes <[email protected]>
The-Best-Codes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready for review 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a Discord bot service that provides AI-powered assistance for goose documentation queries. The bot uses OpenRouter with Google's Gemini model and integrates with the goose Discord server to answer questions by searching and viewing documentation.
Changes:
- New Discord bot service with AI-powered documentation assistance using search and view tools
- Docker deployment configuration with multi-platform support and GitHub Actions workflow
- TypeScript-based implementation using the discraft framework for Discord bot management
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| services/ask-ai-bot/package.json | Package dependencies including discord.js, AI SDK, and zod (with version issue) |
| services/ask-ai-bot/tsconfig.json | TypeScript configuration for the bot service |
| services/ask-ai-bot/index.ts | Main entry point with Discord client initialization and error handling |
| services/ask-ai-bot/clients/ai.ts | OpenRouter AI client setup with model configuration (invalid model name) |
| services/ask-ai-bot/clients/discord.ts | Discord client configuration with required intents |
| services/ask-ai-bot/commands/ping.ts | Basic ping command for health checks |
| services/ask-ai-bot/events/ready.ts | Bot ready event handler with presence setup (logging issue) |
| services/ask-ai-bot/events/error.ts | Error event handler for Discord client errors |
| services/ask-ai-bot/events/messageCreate.ts | Message handler for question threads and follow-ups |
| services/ask-ai-bot/utils/logger.ts | Logger utility wrapper around consola |
| services/ask-ai-bot/utils/ai/index.ts | Core AI interaction logic with streaming and tool tracking |
| services/ask-ai-bot/utils/ai/system-prompt.ts | AI system prompt with proper naming conventions |
| services/ask-ai-bot/utils/ai/tool-tracker.ts | Tool usage tracking for status messages |
| services/ask-ai-bot/utils/ai/chunk-markdown.ts | Markdown chunking to respect Discord's message limits |
| services/ask-ai-bot/utils/ai/tools/index.ts | AI tool definitions for searching and viewing docs |
| services/ask-ai-bot/utils/ai/tools/docs-search.ts | Documentation search using MiniSearch |
| services/ask-ai-bot/utils/ai/tools/docs-viewer.ts | Documentation viewer with path traversal protection |
| services/ask-ai-bot/Dockerfile | Multi-stage Docker build for production deployment |
| services/ask-ai-bot/.dockerignore | Docker ignore configuration for efficient builds |
| services/ask-ai-bot/.gitignore | Git ignore patterns for bot service |
| services/ask-ai-bot/.env.example | Environment variable templates (invalid model name) |
| services/ask-ai-bot/bun.lock | Bun lockfile with dependency versions |
| .github/workflows/publish-ask-ai-bot.yml | GitHub Actions workflow for Docker image publishing |
EbonyLouis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!!
…ntext * 'main' of github.com:block/goose: refactor(providers): extract ProviderDef trait and OpenAiCompatibleProvider (#6832) feat: ask ai discord bot (#6842) chore(maintenance): make GitHub repo configurable for auto-updater and publisher (#6828) fix: make apps work in built copies of goose (#6901) Remove dependency on goose-mcp from goose crate (#6637) Clean up build canonical warnings (#6880) Sync desktop_prompt with UI (#6898)
Signed-off-by: The-Best-Codes <[email protected]> Signed-off-by: Harrison <[email protected]>
Signed-off-by: The-Best-Codes <[email protected]>
Signed-off-by: The-Best-Codes <[email protected]>
Signed-off-by: The-Best-Codes <[email protected]>
Summary
Adding code for Ask AI Discord bot for the goose Discord server.
Type of Change
AI Assistance
Testing
I built and tested the bot... should all be working! 😀