Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9701e37
chore: npm install -D typescript
BLazzeD21 Jan 2, 2024
02d2e6c
fix: fix error with redis and change configuration filling
BLazzeD21 Jan 5, 2024
17330b3
feat: add `tsconfig.json`
BLazzeD21 Jan 5, 2024
58f0e4c
dev!: add commands for production and development
BLazzeD21 Jan 5, 2024
90602fc
chore: add the build directory to .gitignore
BLazzeD21 Jan 5, 2024
de903f9
version: 1.1.3
BLazzeD21 Jan 5, 2024
0ed4251
fix: limit requests only to handlers using openai API
BLazzeD21 Jan 5, 2024
1dd486a
refactor: separate handler registration into a function `registerHand…
BLazzeD21 Jan 5, 2024
570eaf8
fix!: add a check for the existence of the voice directory
BLazzeD21 Jan 5, 2024
5ecbea3
version: 1.1.4
BLazzeD21 Jan 5, 2024
337e16f
fix: fix keyboard call with menu commands
BLazzeD21 Jan 6, 2024
2fe15b4
feat: `lexicon` rewritten for typescript
BLazzeD21 Jan 6, 2024
355d814
version: 1.1.5
BLazzeD21 Jan 6, 2024
3fedab1
chore: add noEmitOnError
BLazzeD21 Jan 17, 2024
a39a389
chore: npm i --save-dev @types/config
BLazzeD21 Jan 18, 2024
e576b32
feat: add typescript types
BLazzeD21 Jan 18, 2024
b101646
feat!: rewrite the entire bot in typescript
BLazzeD21 Jan 18, 2024
159fe31
fix: fix sending messages when starting the bot
BLazzeD21 Jan 18, 2024
67ec795
chore: change configuration for typescript
BLazzeD21 Jan 18, 2024
8be8b20
refactor: move the check inside functions
BLazzeD21 Jan 18, 2024
55b4c9f
refactor: add types for class methods
BLazzeD21 Jan 18, 2024
cc4f4d6
version: 2.0.0
BLazzeD21 Jan 18, 2024
e647f4e
chore: add command for building
BLazzeD21 Jan 18, 2024
51c1b19
docs: add `REDIS_URL`
BLazzeD21 Jan 18, 2024
c875210
version: 2.0.1
BLazzeD21 Jan 18, 2024
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
26 changes: 12 additions & 14 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,18 @@ module.exports = {
'browser': true,
'es2021': true,
},
'extends': 'google',
'overrides': [
{
'env': {
'node': true,
},
'files': [
'.eslintrc.{js,cjs}',
],
'parserOptions': {
'sourceType': 'script',
},
},
'extends': [
'google',
'plugin:@typescript-eslint/recommended',
],
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaVersion': 'latest',
'ecmaVersion': 2021,
'sourceType': 'module',
},
'plugins': [
'@typescript-eslint',
],
'rules': {
'no-unused-vars': 1,
'import/extensions': 0,
Expand All @@ -30,5 +24,9 @@ module.exports = {
'quotes': ['error', 'single'],
'no-multi-str': 0,
'guard-for-in': 0,
'new-cap': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/ban-types': 0,
'@typescript-eslint/no-unused-vars': 'warning',
},
};
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,7 @@ dist

# Configuration files
config/default.json
config/production.json
config/production.json

# Compiled version of project
build
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ ENV PORT=3000

EXPOSE $PORT

CMD sh -c "redis-server --daemonize yes && npm start"
CMD sh -c "redis-server --daemonize yes && npm run build && npm start"
8 changes: 4 additions & 4 deletions config/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ First file `default.json` with code:
"OPENAI_KEY": "OpenAI Key",
"USERS_ID": "User IDs separated by commas without spaces",
"SUPER_USER": "ID",
"REDIS_HOST": "127.0.0.1",
"REDIS_PORT": "6379",
"REDIS_URL": "redis://127.0.0.1:6379/1",
"PROXY_URL": "http://user:password@host:port"
}
```
Expand All @@ -22,8 +21,7 @@ Second file `production.json` with code:
"OPENAI_KEY": "OpenAI Key",
"USERS_ID": "User IDs separated by commas without spaces",
"SUPER_USER": "ID",
"REDIS_HOST": "127.0.0.1",
"REDIS_PORT": "6379",
"REDIS_URL": "redis://127.0.0.1:6379/1",
"PROXY_URL": "http://user:password@host:port"
}
```
Expand All @@ -34,3 +32,5 @@ Telegram token you can get in [BotFather](https://t.me/BotFather)

Secret API key from openai you can get in [API keys](https://platform.openai.com/account/api-keys)

Redis `redis[s]://[[username][:password]@][host][:port][/db-number]`

Loading