Compare commits
2 Commits
master
...
feature/ch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2c954136d | ||
|
|
5820583609 |
2
.github/workflows/coverage.yml
vendored
2
.github/workflows/coverage.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Collect Code Coverage
|
- name: Collect Code Coverage
|
||||||
run: |
|
run: |
|
||||||
LINE_PCT=$(npm run test:coverage | tail -2 | head -1 | awk '{print $3}')
|
LINE_PCT=$(npm run coverage | tail -2 | head -1 | awk '{print $3}')
|
||||||
echo "COVERAGE=$LINE_PCT" >> $GITHUB_ENV
|
echo "COVERAGE=$LINE_PCT" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Upload Code Coverage
|
- name: Upload Code Coverage
|
||||||
|
|||||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -47,4 +47,4 @@ jobs:
|
|||||||
|
|
||||||
- name: Test Application
|
- name: Test Application
|
||||||
run: |
|
run: |
|
||||||
npm run test:run
|
npm run tests
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"exports": "./build/index.js",
|
"exports": "./build/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test:run": "vitest run",
|
"tests": "vitest run",
|
||||||
"test:coverage": "vitest run --coverage",
|
"coverage": "vitest run --coverage",
|
||||||
"watch": "tsx watch src",
|
"watch": "tsx watch src",
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"prod": "node .",
|
"prod": "node .",
|
||||||
|
|||||||
@@ -33,12 +33,15 @@ const messageHistory: Queue<UserMessage> = new Queue<UserMessage>
|
|||||||
registerEvents(client, Events, messageHistory, ollama, Keys.defaultModel)
|
registerEvents(client, Events, messageHistory, ollama, Keys.defaultModel)
|
||||||
|
|
||||||
// Try to connect to redis
|
// Try to connect to redis
|
||||||
await redis.connect()
|
try {
|
||||||
.then(() => console.log('[Redis] Connected'))
|
await redis.connect()
|
||||||
.catch((error) => {
|
console.log('[Redis] Successfully Connected')
|
||||||
console.error('[Redis] Connection Error', error)
|
} catch(error) {
|
||||||
process.exit(1)
|
console.error('[Redis] Connection Error. See error below:\n', error)
|
||||||
})
|
console.warn('[Redis] Failed to connect to Redis Database, using local system')
|
||||||
|
// TODO: create boolean flag that will probably be used in messageCreate.ts if redis database is down
|
||||||
|
// When implementing this boolean flag, move connection to database BEFORE the registerEvents method
|
||||||
|
}
|
||||||
|
|
||||||
// Try to log in the client
|
// Try to log in the client
|
||||||
await client.login(Keys.clientToken)
|
await client.login(Keys.clientToken)
|
||||||
|
|||||||
Reference in New Issue
Block a user