Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 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
f3ff46f
init
techwithanirudh Jul 26, 2025
aae569b
upd
techwithanirudh Jul 26, 2025
97fe67b
refactor: migrate from discord.js v14 to selfbot v13 API
techwithanirudh Jul 26, 2025
e4f5ad0
fix: check bot ID directly instead of using author.bot flag for messa…
techwithanirudh Jul 26, 2025
20d0ad7
refactor: remove discord tool and update bot personality to Gork
techwithanirudh Jul 26, 2025
3dd4a02
refactor: remove chat/channels commands and update bot personality wi…
techwithanirudh Jul 26, 2025
de9be26
refactor: remove chat/channels commands and update bot personality wi…
techwithanirudh Jul 26, 2025
27b82fa
refactor: remove sandbox utility and update message normalization to …
techwithanirudh Jul 26, 2025
bebcf73
refactor: remove channel allowlist functionality and associated Redis…
techwithanirudh Jul 26, 2025
138d2bf
refactor: simplify and clarify AI prompt instructions for message rel…
techwithanirudh Jul 26, 2025
c967783
feat: add message reference support to model message conversion
techwithanirudh Jul 27, 2025
1e9a0d2
refactor: make getTrigger async and add null check for botId
techwithanirudh Jul 27, 2025
200ea0b
refactor: centralize types and add rich presence with external image …
techwithanirudh Jul 27, 2025
458ed30
refactor: centralize type definitions and add new activity statuses
techwithanirudh Jul 27, 2025
9404e1c
feat: add command deployment script and format imports
techwithanirudh Jul 27, 2025
db935f5
refactor: move RequestHints type to types file and clean up config/lo…
techwithanirudh Jul 27, 2025
beec044
feat: add command filtering to reply prompt to prevent prompt injection
techwithanirudh Jul 27, 2025
7c675c8
refactor: improve AI relevance detection prompt with clearer examples…
techwithanirudh Jul 27, 2025
8eb2af2
feat: add joinServer tool to allow bot to join Discord servers via in…
techwithanirudh Jul 27, 2025
eb03332
feat: add startDM tool to send direct messages to users
techwithanirudh Jul 27, 2025
d76e44c
feat: add Pinecone vector database integration for semantic search
techwithanirudh Jul 27, 2025
b536032
feat: integrate Pinecone for vector memory storage and retrieval
techwithanirudh Jul 27, 2025
285f717
Bot stealth latest (#22)
techwithanirudh Jul 29, 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
79 changes: 44 additions & 35 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,44 @@
{
"$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"],
"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",
"imgork",
"dalle",
"dall",
"arcas",
"techwithanirudh",
"selfbot",
"shitposter",
"cynicist",
"autobotting",
"dotproduct",
"rerankinig",
"textembbeding",
"lefthook"
Comment on lines +40 to +42
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typos in custom dictionary entries

rerankinig and textembbeding are misspelled, defeating the purpose of adding them to the spell-checker dictionary.

-    "rerankinig",
-    "textembbeding",
+    "reranking",
+    "textembedding",
📝 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
"rerankinig",
"textembbeding",
"lefthook"
"reranking",
"textembedding",
"lefthook"
🤖 Prompt for AI Agents
In the .cspell.json file around lines 40 to 42, correct the typos in the custom
dictionary entries by changing "rerankinig" to "reranking" and "textembbeding"
to "textembedding" to ensure these terms are recognized correctly by the
spell-checker.

]
}
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

[*.md]
trim_trailing_whitespace = true
Comment on lines +9 to +13
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Non-standard quote_type may be ignored by tools

quote_type is not part of the EditorConfig core spec.
Unless every contributor’s editor has a custom plugin that understands this key, the rule will silently be ignored and you’ll end up with divergent quoting styles. Consider enforcing quotes through ESLint/Prettier instead and drop the custom key here.

Likewise, the [*.md] section overrides insert_final_newline to false, contradicting the root section’s true. Double-check that this is intentional; mixed behaviour across file types often surprises CI formatters.

🤖 Prompt for AI Agents
In the .editorconfig file around lines 9 to 13, remove the non-standard
'quote_type' key as it is not recognized by EditorConfig and may be ignored by
editors, leading to inconsistent quoting styles. Instead, enforce quote styles
using ESLint or Prettier configurations. Also, verify the '[*.md]' section does
not override 'insert_final_newline' to false if the root section sets it to
true, to avoid conflicting newline rules across file types; adjust or remove
this override if it is unintentional.

insert_final_newline = false
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ DISCORD_DEFAULT_GUILD_ID=your_discord_default_guild_id_here
OPENAI_API_KEY=your_openai_api_key_here
# HACKCLUB_API_KEY=your_hackclub_api_key_here
# OPENROUTER_API_KEY=your_openrouter_api_key_here
# COHERE_API_KEY=your_cohere_api_key_here

# ---------------------------------------------------------------------------------------------------------
# Redis
Expand All @@ -39,9 +40,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"
],
Comment on lines +6 to +12
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

"prettier" still in extends after removing .prettierrc

If Prettier is no longer part of the tool-chain, keeping the config in ESLint adds an unnecessary peer-dependency and runtime install step. Consider deleting the entry or restoring Prettier.

-    "plugin:import-x/typescript",
-    "prettier"
+    "plugin:import-x/typescript"
📝 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
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import-x/recommended",
"plugin:import-x/typescript",
"prettier"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import-x/recommended",
"plugin:import-x/typescript"
],
🤖 Prompt for AI Agents
In .eslintrc.json around lines 6 to 12, the "prettier" entry remains in the
"extends" array despite removing the .prettierrc file. To fix this, either
remove the "prettier" entry from the "extends" array if Prettier is no longer
used, or restore the .prettierrc configuration file if Prettier should remain
part of the toolchain.

"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
}
}
}
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
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.

🧹 Nitpick (assertive)

Line-ending mismatch violates repo style

YAMLlint warns about \r\n. Convert to LF to align with .editorconfig.

-github: techwithanirudh\r
-buy_me_a_coffee: techwithanirudh\r
+github: techwithanirudh
+buy_me_a_coffee: 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
github: techwithanirudh
buy_me_a_coffee: techwithanirudh
github: techwithanirudh
buy_me_a_coffee: techwithanirudh
🧰 Tools
🪛 YAMLlint (1.37.1)

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

(new-lines)

🤖 Prompt for AI Agents
In .github/FUNDING.yml at lines 1 to 2, the file uses Windows-style line endings
(\r\n) which violates the repository style that requires LF line endings.
Convert all line endings in this file from CRLF to LF to comply with the
.editorconfig settings and resolve the YAMLlint warning.

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

Add a top-level H1 to satisfy markdownlint MD041

markdownlint flags the absence of a first-line heading. A minimal fix keeps the template valid without changing wording:

-### Description
+# Pull Request Template
+
+### 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? -->
# Pull Request Template
### 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

(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 H1 heading
as the very first line of the file to satisfy markdownlint rule MD041. This
heading should be minimal and can simply state something like "Pull Request
Template" to keep the template valid without altering the existing content.


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