Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 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
f6f47b0
feat: add CI workflow with ESLint, TypeScript, Prettier, and spelling…
techwithanirudh Jun 18, 2025
ca29316
feat: add setup action for Bun with caching and environment variables
techwithanirudh Jun 18, 2025
646d04b
Merge branch 'main' of https://github.com/techwithanirudh/discord-ai-…
techwithanirudh Jun 18, 2025
817453c
chore: remove unused npl-testing.ts file
techwithanirudh Jun 18, 2025
4191a3e
fix: update license information from AGPL-v3 to MIT
techwithanirudh Jun 18, 2025
0f888d1
style(format): improve code formatting
techwithanirudh Jun 18, 2025
92f3d7d
fix(editorconfig): update newline and whitespace settings for consist…
techwithanirudh Jun 18, 2025
be5cf38
refactor: remove memories handling from chat context and related func…
techwithanirudh Jun 20, 2025
5d87928
Merge branch 'main' of https://github.com/techwithanirudh/discord-ai-…
techwithanirudh Jun 20, 2025
4512e58
refactor: clean up commented code and improve attachment processing l…
techwithanirudh Jun 20, 2025
6c00456
refactor: update reasoning model to use Google AI and log shared stat…
techwithanirudh Jun 20, 2025
4e3c3bc
refactor: update replyPrompt to remove unnecessary starting sentence
techwithanirudh Jun 20, 2025
1aa2a14
refactor: update AI provider configurations
techwithanirudh Jun 20, 2025
3f5113a
feat: improve prompt eng
techwithanirudh Jun 25, 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
70 changes: 35 additions & 35 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,35 +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}'"],
"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"
]
}
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"dictionaries": ["software-terms", "npm", "fullstack", "redis"],
"files": ["**", ".vscode/**", ".github/**"],
"ignorePaths": ["bun.lock"],
Comment on lines +4 to +5
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Redundant glob patterns in files array

"**" already includes .vscode/** and .github/**; listing them separately adds noise without changing behaviour. Unless you’re overriding an exclusion elsewhere, the array can be simplified to just "**".

🤖 Prompt for AI Agents
In the .cspell.json file at lines 4 to 5, the "files" array redundantly lists
"**", ".vscode/**", and ".github/**". Since "**" already includes all files and
directories recursively, remove the explicit ".vscode/**" and ".github/**"
entries, leaving only "**" in the array to simplify the configuration without
changing behavior.

"ignoreRegExpList": ["apiKey='[a-zA-Z0-9-]{32}'"],
"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"
]
}
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ indent_size = 2
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true
quote_type = single
Comment on lines +9 to +10
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

quote_type is not recognised by EditorConfig

Custom keys are ignored by most EditorConfig parsers.
If you want to enforce single quotes, move the rule to Prettier or ESLint instead.

🤖 Prompt for AI Agents
In the .editorconfig file at lines 9 to 10, the key 'quote_type' is not
recognized by EditorConfig and will be ignored. Remove the 'quote_type' setting
from this file and instead configure the quote style enforcement in your
Prettier or ESLint configuration files to ensure single quotes are properly
enforced.


[*.md]
trim_trailing_whitespace = true
insert_final_newline = false
3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ LOG_DIRECTORY=logs
# ---------------------------------------------------------------------------------------------------------
# Memory
# A global memory service for storing and retrieving data.
# @see https://mem0.ai/
# ---------------------------------------------------------------------------------------------------------
MEM0_API_KEY=your_mem0_api_key_here
# MEM0_API_KEY=your_mem0_api_key_here

# ---------------------------------------------------------------------------------------------------------
# Voice Channel
Expand Down
68 changes: 34 additions & 34 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
{
"env": {
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import-x/recommended",
"plugin:import-x/typescript",
"prettier"
],
"plugins": ["@typescript-eslint", "import-x"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"semi": ["warn", "always"],
"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
}
}
}
{
"env": {
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import-x/recommended",
"plugin:import-x/typescript",
"prettier"
],
"plugins": ["@typescript-eslint", "import-x"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"semi": ["warn", "always"],
"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 +28 to +31
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

JSON comments & trailing commas can break strict parsers

.eslintrc.json now contains // comments and trailing commas. ESLint loads this file via its @eslint/eslintrc loader (JSONC-aware), so it usually works, but other tools (e.g. editors, schema validators, CI linters) treat the file as strict JSON and will fail.

Two options:

  1. Rename to .eslintrc.jsonc (supported by ESLint) to signal JSON-with-comments.
  2. Drop the inline comments and trailing commas to stay valid JSON.

Pick whichever keeps the tool-chain simplest.

🤖 Prompt for AI Agents
In the .eslintrc.json file around lines 28 to 31, remove all inline comments
starting with // and eliminate any trailing commas to ensure the file is valid
strict JSON. Alternatively, rename the file to .eslintrc.jsonc if you want to
keep comments and trailing commas, as ESLint supports JSONC format. Choose the
approach that best fits your toolchain requirements.

}
}
}
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github: techwithanirudh
buy_me_a_coffee: techwithanirudh
github: techwithanirudh
buy_me_a_coffee: techwithanirudh
85 changes: 42 additions & 43 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
name: Check setup

runs:
using: composite
steps:
- name: Setup bun
uses: oven-sh/setup-bun@v2

- name: Get Bun cache directory
shell: bash
run: |
echo "STORE_PATH=${HOME}/.bun/install/cache" >> $GITHUB_ENV

- name: Setup Bun cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-

- name: Install dependencies
shell: bash
run: bun install

- name: Create environment variables file
shell: bash
run: |
cat << EOF > .env.local
DISCORD_TOKEN=your_discord_token_here
DISCORD_CLIENT_ID=your_discord_client_id_here
DISCORD_OWNER_ID=your_discord_owner_id_here
DISCORD_DEFAULT_GUILD_ID=your_discord_default_guild_id_here
OPENAI_API_KEY=sk-your_openai_api_key_here
UPSTASH_REDIS_REST_URL=https://your_upstash_redis_rest_url.upstash.io
UPSTASH_REDIS_REST_TOKEN=your_upstash_redis_rest_token
LOG_LEVEL=INFO
LOG_DIRECTORY=logs
MEM0_API_KEY=m0-api_key_here
DEEPGRAM_API_KEY=your_deepgram_api_key_here
ELEVENLABS_API_KEY=your_elevenlabs_api_key_here
EXA_API_KEY=your_exa_api_key_here
EOF
name: Check setup

runs:
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)

CRLF line endings flagged by yamllint

yamllint reports “wrong new line character: expected \n”.
Convert this file to LF to keep cross-platform consistency and silence CI warnings.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 1-1: wrong new line character: expected \n

(new-lines)

🤖 Prompt for AI Agents
In .github/actions/setup/action.yml at the beginning of the file (lines 1 to 3),
the file uses CRLF line endings which cause yamllint warnings. Convert all line
endings in this file from CRLF to LF to ensure cross-platform consistency and
eliminate the linting errors.

using: composite
steps:
- name: Setup bun
uses: oven-sh/setup-bun@v2

- name: Get Bun cache directory
shell: bash
run: |
echo "STORE_PATH=${HOME}/.bun/install/cache" >> $GITHUB_ENV

- name: Setup Bun cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-

- name: Install dependencies
shell: bash
run: bun install

- name: Create environment variables file
shell: bash
run: |
cat << EOF > .env.local
DISCORD_TOKEN=your_discord_token_here
DISCORD_CLIENT_ID=your_discord_client_id_here
DISCORD_OWNER_ID=your_discord_owner_id_here
DISCORD_DEFAULT_GUILD_ID=your_discord_default_guild_id_here
OPENAI_API_KEY=sk-your_openai_api_key_here
UPSTASH_REDIS_REST_URL=https://your_upstash_redis_rest_url.upstash.io
UPSTASH_REDIS_REST_TOKEN=your_upstash_redis_rest_token
LOG_LEVEL=INFO
LOG_DIRECTORY=logs
DEEPGRAM_API_KEY=your_deepgram_api_key_here
ELEVENLABS_API_KEY=your_elevenlabs_api_key_here
EXA_API_KEY=your_exa_api_key_here
EOF
50 changes: 25 additions & 25 deletions .github/pull-request-template.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
### Description

<!-- Describe your changes in detail. What problem does this PR solve? -->

### 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)

### Additional Notes

<!-- Add any additional notes for reviewers -->
### 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)

Optional: add a top-level heading to satisfy markdownlint (MD041).

+# # Pull Request
📝 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? -->
# # Pull Request
### 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, add a top-level heading
(e.g., starting with #) at the very beginning of the file to satisfy
markdownlint rule MD041, which requires a top-level heading in markdown
documents.


### 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)

### Additional Notes

<!-- Add any additional notes for reviewers -->
Loading
Loading