Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ef17b2b
feat: Add chat command for AI interaction and enhance message handlin…
techwithanirudh Jun 15, 2025
7f16a78
chore: Update ESLint configuration and dependencies for improved code…
techwithanirudh Jun 15, 2025
61268b3
refactor: Reorganize imports across multiple files for improved clari…
techwithanirudh Jun 15, 2025
9d0d6e8
chore: Update cSpell configuration in VSCode settings for improved sp…
techwithanirudh Jun 15, 2025
6f5c055
chore: Comment out unused AI provider configurations for future refer…
techwithanirudh Jun 15, 2025
cb81c38
chore: Remove unused imports from AI provider configurations in provi…
techwithanirudh Jun 15, 2025
8d8d5e3
refactor: Replace 'any' with 'unknown' in type definitions for improv…
techwithanirudh Jun 15, 2025
2a00631
refactor: Update initialMessages to use 'as const' for improved type …
techwithanirudh Jun 15, 2025
0cc84fc
fix: Await audio generation in createListeningStream for proper execu…
techwithanirudh Jun 15, 2025
21f0a5a
ff
techwithanirudh Jun 16, 2025
02f0401
feat: Integrate ExaAI for web search functionality and update environ…
techwithanirudh Jun 16, 2025
401ace0
fix: Update speed factor for improved performance and refine AI respo…
techwithanirudh Jun 17, 2025
7ad6df3
feat: Add web search and weather functionality to AI prompts; update …
techwithanirudh Jun 17, 2025
d1f2fd1
fix: Update memory options check to allow explicit false value and ad…
techwithanirudh Jun 17, 2025
5bea9b2
fix: Replace console.log with logger for search results in searchWeb …
techwithanirudh Jun 18, 2025
3cbfa63
chore: add commitlint configuration and update package scripts
techwithanirudh Jun 18, 2025
d9369af
chore: add CODEOWNERS and FUNDING.yml files; include pull request tem…
techwithanirudh Jun 18, 2025
4bfc3be
fix: lint
techwithanirudh Jun 18, 2025
38ee5bc
fix: remove JavaScript files from ESLint ignore list
techwithanirudh Jun 18, 2025
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
35 changes: 35 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"dictionaries": ["software-terms", "npm", "fullstack", "redis"],
"files": ["**", ".vscode/**", ".github/**"],
"ignorePaths": ["bun.lock"],
"ignoreRegExpList": ["apiKey='[a-zA-Z0-9-]{32}'"],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Regex for API keys is too specific

"[a-zA-Z0-9-]{32}" only matches 32-char keys. Many providers (OpenAI, Exa, etc.) use 40–48 chars. Consider increasing the range or adding provider-specific patterns so keys aren’t accidentally committed.

🤖 Prompt for AI Agents
In .cspell.json at line 6, the regex for ignoring API keys is too restrictive,
matching only 32-character keys. Update the regex to cover a broader range, such
as 32 to 48 characters, or add multiple patterns for different providers to
prevent accidental commits of various API key formats.

"import": [
"@cspell/dict-redis/cspell-ext.json",
"@cspell/dict-bash/cspell-ext.json"
],
"useGitignore": true,
"version": "0.2",
"words": [
"anirudh",
"sriram",
"Fellipe",
"Utaka",
"umami",
"assemblyai",
"bitstream",
"zenix",
"openrouter",
"elevenlabs",
"hackclub",
"deepgram",
"libsodium",
"livecrawl",
"grok",
"gork",
"dalle",
"dall",
"arcas",
"techwithanirudh"
]
}
9 changes: 8 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,11 @@ MEM0_API_KEY=your_mem0_api_key_here
# @see https://elevenlabs.io/
# ---------------------------------------------------------------------------------------------------------
DEEPGRAM_API_KEY=your_deepgram_api_key_here
ELEVENLABS_API_KEY=your_elevenlabs_api_key_here
ELEVENLABS_API_KEY=your_elevenlabs_api_key_here

# ---------------------------------------------------------------------------------------------------------
# Search
# Search the web using ExaAI.
# @see https://exa.ai/
# ---------------------------------------------------------------------------------------------------------
EXA_API_KEY=your_exa_api_key_here
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
*/.js
*.js
node_modules
*.json
13 changes: 11 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,29 @@
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import-x/recommended",
"plugin:import-x/typescript",
"prettier"
],
"plugins": ["@typescript-eslint"],
"plugins": ["@typescript-eslint", "import-x"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"semi": ["warn", "always"],
"quotes": ["warn", "double"],
"arrow-parens": ["warn", "always"],
"no-unused-vars": "warn",
"no-console": "off",
"import/prefer-default-export": "off"
},
"settings": {
"import/resolver": {
// You will also need to install and configure the TypeScript resolver
// See also https://github.com/import-js/eslint-import-resolver-typescript#configuration
"typescript": true,
"node": true
}
}
Comment on lines +26 to 33
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

JSON comments break the ESLint config

Plain .json files cannot contain // comments – Node will fail to parse this config, and ESLint will fall back to defaults.

Either:

  1. Rename the file to .eslintrc.cjs / .eslintrc.js and export a JS object (preferred), or
  2. Remove the inline comments.
-      // You will also need to install and configure the TypeScript resolver
-      // See also https://github.com/import-js/eslint-import-resolver-typescript#configuration
       "typescript": true,
       "node": true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"settings": {
"import/resolver": {
// You will also need to install and configure the TypeScript resolver
// See also https://github.com/import-js/eslint-import-resolver-typescript#configuration
"typescript": true,
"node": true
}
}
"settings": {
"import/resolver": {
"typescript": true,
"node": true
}
}
🤖 Prompt for AI Agents
In the .eslintrc.json file around lines 26 to 33, remove the inline `//`
comments because JSON does not support comments and this causes parsing errors.
To fix this, either rename the file to .eslintrc.cjs or .eslintrc.js and export
the config as a JavaScript object allowing comments, or delete the comments
entirely to keep it valid JSON.

}
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @techwithanirudh
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Add a trailing newline for POSIX-compliance

Most linters/readers expect text files to end with a \n.
Appending one avoids diff noise the next time the file is edited.

-* @techwithanirudh
+* @techwithanirudh
+
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* @techwithanirudh
* @techwithanirudh
🤖 Prompt for AI Agents
In .github/CODEOWNERS at line 1, the file lacks a trailing newline character
which is required for POSIX-compliance. Add a newline character at the end of
the file to ensure it ends with a '\n', preventing unnecessary diff noise in
future edits.

2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: techwithanirudh
buy_me_a_coffee: techwithanirudh
25 changes: 25 additions & 0 deletions .github/pull-request-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### Description

<!-- Describe your changes in detail. What problem does this PR solve? -->
Comment on lines +1 to +3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Use an H1 heading to satisfy markdown-lint MD041

The first line should be a top-level heading (# Description) instead of an H3.
This silences MD041 and makes the template consistent with most OSS projects.

-### Description
+# Description
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Description
<!-- Describe your changes in detail. What problem does this PR solve? -->
# Description
<!-- Describe your changes in detail. What problem does this PR solve? -->
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

1-1: First line in a file should be a top-level heading
null

(MD041, first-line-heading, first-line-h1)

🤖 Prompt for AI Agents
In .github/pull-request-template.md at lines 1 to 3, change the heading from an
H3 (### Description) to an H1 (# Description) to comply with markdown-lint rule
MD041 and align with common open source project conventions.


### Type of Change

<!-- Put an 'x' in all boxes that apply -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Refactor (non-breaking change that doesn't fix a bug or add a feature)
- [ ] Documentation update

### Pre-flight Checklist

<!-- Put an 'x' in all boxes that apply -->

- [ ] Changes are limited to a single feature, bugfix or chore (split larger changes into separate PRs)
- [ ] `bun check` without any issues
- [ ] I have reviewed [contributor guidelines](https://github.com/techwithanirudh/discord-ai-bot/blob/main/CONTRIBUTING.md)

Comment on lines +5 to +22
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Checkbox sections lack default headings and may confuse contributors

Consider adding short instructions above each checkbox block (e.g. “Select all that apply”) and collapsing redundant wording (“non-breaking change which” → “non-breaking change that”). Improves clarity and reduces line length.
No functional impact, purely readability.

🧰 Tools
🪛 LanguageTool

[style] ~9-~9: Consider using a different verb for a more formal wording.
Context: ... [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaki...

(FIX_RESOLVE)

🤖 Prompt for AI Agents
In .github/pull-request-template.md around lines 5 to 22, add brief instructions
above each checkbox section such as "Select all that apply" to guide
contributors. Also, simplify the checkbox descriptions by replacing phrases like
"non-breaking change which" with "non-breaking change that" to improve clarity
and reduce line length. This will enhance readability without affecting
functionality.

### Additional Notes

<!-- Add any additional notes for reviewers -->
2 changes: 2 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bun commitlint --edit $1
bun check:spelling $1
Comment on lines +1 to +2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Second command will not execute – use bun run (or bunx).

bun check:spelling is not a standalone binary; it’s a script. Without run, the hook exits with “file not found”.

 bun commitlint --edit $1
-bun check:spelling $1
+bun run check:spelling $1
🤖 Prompt for AI Agents
In .husky/commit-msg at lines 1 to 2, the second command 'bun check:spelling $1'
is incorrectly called as a standalone binary, causing the hook to fail. To fix
this, prefix the second command with 'bun run' (or 'bunx') so it runs as a
script, changing it to 'bun run check:spelling $1' to ensure both commands
execute properly.

1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bun lint-staged
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Hard dependency on Bun may break contributor workflow

Not every machine running the repo will have bun installed, causing the pre-commit hook to fail. Consider falling back to npm/pnpm or making the command configurable:

-bun lint-staged
+command -v bun >/dev/null 2>&1 && bun lint-staged || npx lint-staged
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
bun lint-staged
# .husky/pre-commit
command -v bun >/dev/null 2>&1 && bun lint-staged || npx lint-staged
🤖 Prompt for AI Agents
In the .husky/pre-commit file at line 1, the pre-commit hook currently runs the
command "bun lint-staged", which assumes Bun is installed on every contributor's
machine. To fix this, modify the script to check if Bun is available and fall
back to npm or pnpm if not, or make the command configurable via an environment
variable or config file. This ensures the pre-commit hook works regardless of
the package manager installed.

10 changes: 0 additions & 10 deletions .vscode/settings.json

This file was deleted.

48 changes: 32 additions & 16 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
- Handle Message Interruptions
- Add Web Search using Exa
- Attachments Support
(final goal) - @gork / @zenix is it true?

Agent Isolation for each server, role based access control
mention that u need to install rust curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Put commands like join and leave as a subcommand under VC, make an easierway to have subcommands rather clubbing in one file
Stream back audio from ElevenLabs instead of non streaming
Switch to AI SDK Voice leater

seperate deepgram code into its seperate files
probably switch to 11 labs
Implement memory for the ai voic chat
Add commit lint
Allow people to customize zenix's speed in config
- Add Web Search using Exa (Done)
- Attachments Support (Done)
- (final goal) - @grok (gork) / @zenix is it true?

The Discord Agent Isolation for each server, full RBAC
Switch to ElevenLabs instead of deepgram voice as it's more realistic.

Separate Deepgram code into it's files
Implement Conversation history for Voice Chat, previous message memory + chat history.
Add Commit Lint to enforce strict commit messages, and add lint pipelines.
Comment on lines +9 to +11
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Minor grammar: use possessive “its”

“Separate Deepgram code into it's files”

Should be “its”.

-Separate Deepgram code into it's files
+Separate Deepgram code into its files
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Separate Deepgram code into it's files
Implement Conversation history for Voice Chat, previous message memory + chat history.
Add Commit Lint to enforce strict commit messages, and add lint pipelines.
Separate Deepgram code into its files
Implement Conversation history for Voice Chat, previous message memory + chat history.
Add Commit Lint to enforce strict commit messages, and add lint pipelines.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~9-~9: Did you mean “its” (the possessive pronoun)?
Context: ...realistic. Separate Deepgram code into it's files Implement Conversation history fo...

(ITS_PREMIUM)

🤖 Prompt for AI Agents
In TODO.md around lines 9 to 11, the phrase "Separate Deepgram code into it's
files" uses the incorrect possessive form "it's." Replace "it's" with the
correct possessive pronoun "its" to fix the grammar.

Allow People to Customize Zenix's Speed, and other settings in a /config command (per-server).
Refactor the channels command to be more easy to use, with deny and allow lists.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Wording nit: “more easy” → “easier”

-Refactor the channels command to be more easy to use
+Refactor the channels command to be easier to use
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Refactor the channels command to be more easy to use, with deny and allow lists.
- Refactor the channels command to be more easy to use, with deny and allow lists.
+ Refactor the channels command to be easier to use, with deny and allow lists.
🧰 Tools
🪛 LanguageTool

[style] ~13-~13: The phrasing ‘more easy’ can sound awkward and informal. Consider using a comparative adjective or other alternative.
Context: ...r). Refactor the channels command to be more easy to use, with deny and allow lists. Det...

(MORE_EASY_N_CLEAR)

🤖 Prompt for AI Agents
In TODO.md at line 13, change the phrase "more easy" to the grammatically
correct "easier" to improve wording clarity.


Detect when the user sent an unfinished sentence as a request and wait until they complete the response before replying fully, wait 1-2 seconds (for one user). This adds deduping

If a user interrupts it's replying, it will pause the current reply and reply to the other one with context.

Have a small dashboard UI to modify the bots settings
Add a slash chat command to chat with the AI on servers.
Figure out the issue if you join and close stream multiple DeepGram things are kept

When the user is typing increase the response speed by 0.5x. Also, use a different method for responding like a set WPM.

Add CI/CD testing so pushing things to production don't break stuff.

Add context to when the bot is triggered—for example, whether it’s due to a ping, a message, or some other interaction.

Switch from Mem0 (free, limited plan) to a more efficient memory system like Pinecone or another vector store. Implement a better memory workflow with both long-term and short-term memory. This way, the bot can retain conversation history, summarize previous messages, and maintain context over time.

Look into CrewAI or build your own custom memory system (a custom approach is likely more flexible). The goal is for Zenix to be more tightly integrated with both voice chat and text messages.

Zenix should have unified memory per user across all servers—not separate memories per server. That way, the bot always remembers the same person no matter where they interact with it.
Loading