Skip to content

Commit

Permalink
Merge branch 'v5-dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
jimchen5209 committed Dec 15, 2024
2 parents 5cc14d9 + 9abf571 commit 3717764
Show file tree
Hide file tree
Showing 50 changed files with 2,211 additions and 2,146 deletions.
10 changes: 0 additions & 10 deletions .eslintignore

This file was deleted.

40 changes: 0 additions & 40 deletions .eslintrc.json

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ jobs:
- name: Check out code
uses: actions/checkout@v4

- name: Use Node.js 20.x
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: '20'
# cache: 'yarn'
node-version: '22'

- name: Cache dependencies
uses: actions/cache@v3
Expand All @@ -30,5 +29,8 @@ jobs:
- name: Install Dependencies
run: yarn install --immutable

- name: Lint
run: yarn lint:check

- name: Build
run: yarn build
13 changes: 7 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,14 @@ dist
#liveshare
.vsls.json

# project
logs/
# IDE
.vscode/
config.json
vlogdata.json
__pycache__/
.idea/

# project
assets/
vlogdata.json.bak
logs/
caches/
config*.json
vlogdata.json
vlogdata.json.bak
95 changes: 0 additions & 95 deletions .yarn/patches/eris-npm-0.17.2-40f32b9a18.patch

This file was deleted.

31 changes: 31 additions & 0 deletions .yarn/patches/eris-npm-0.18.0-57724b4df9.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/lib/voice/VoiceConnection.js b/lib/voice/VoiceConnection.js
index 858a4b60a46388f0647a5a70a44c8c96a9c2ab25..dd4a970abd5c60c99d4079f51c9e39635bbb3172 100644
--- a/lib/voice/VoiceConnection.js
+++ b/lib/voice/VoiceConnection.js
@@ -378,7 +378,12 @@ class VoiceConnection extends EventEmitter {
return;
}
if (code === 4006) {
- reconnecting = false;
+ if (this.channelID) {
+ reconnecting = true;
+ err = null;
+ } else {
+ reconnecting = false;
+ }
} else if (code === 4014) {
if (this.channelID) {
data.endpoint = null;
diff --git a/lib/voice/streams/OggOpusTransformer.js b/lib/voice/streams/OggOpusTransformer.js
index 8c2aeb78a35c8d3cdf79fa6e21b35ff0b9b4bd6d..24c72f353acb45b517863e5f12cab17f8e4a9de3 100644
--- a/lib/voice/streams/OggOpusTransformer.js
+++ b/lib/voice/streams/OggOpusTransformer.js
@@ -74,7 +74,7 @@ class OggOpusTransformer extends BaseTransformer {
}

_final(cb) {
- if (!this._bitstream) {
+ if (!this._bitstream === undefined) {
this.emit("error", new Error("No Opus stream was found"));
}
cb();
51 changes: 51 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import typescriptEslint from 'typescript-eslint'
import globals from 'globals'
import pluginJs from '@eslint/js'
import stylistic from '@stylistic/eslint-plugin'

export default [
pluginJs.configs.recommended,
...typescriptEslint.configs.recommended,
{
ignores: [
'**/node_modules',
'**/dist',
'**/coverage',
'**/ecosystem.config.js'
]
},
{
plugins: {
'@stylistic': stylistic
},

languageOptions: {
globals: {
...globals.node
},
ecmaVersion: 12,
sourceType: 'module'
},

rules: {
eqeqeq: 'error',
'no-unused-vars': 'warn',
camelcase: ['warn', { properties: 'never', ignoreDestructuring: true, ignoreImports: true }],
'no-var': 'error',
'no-useless-return': 'error',
'no-else-return': 'error',
'no-empty': 'error',
'no-duplicate-imports': 'error',

'@stylistic/indent': ['error', 2, { SwitchCase: 1 }],
'@stylistic/linebreak-style': ['error', 'unix'],
'@stylistic/quotes': ['error', 'single'],
'@stylistic/semi': ['error', 'never'],
'@stylistic/no-trailing-spaces': 'error',
'@stylistic/space-before-function-paren': ['error', { named: 'never' }],
'@stylistic/space-in-parens': 'error',
'@stylistic/space-before-blocks': 'error',
'@stylistic/comma-dangle': 'error'
}
}
]
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discord_voice_log",
"version": "4.3.0",
"version": "5.0.0",
"main": "dist/index.js",
"repository": {
"type": "git",
Expand All @@ -9,14 +9,15 @@
"author": "Jim Chen <[email protected]>",
"license": "AGPL-3.0-only",
"scripts": {
"lint": "tslint --project . --fix",
"lint": "eslint . --fix",
"lint:check": "eslint . --max-warnings 0",
"build": "tsc --pretty",
"build:prod": "tsc --pretty --sourceMap false"
"build:prod": "tsc --pretty --inlineSourceMap false"
},
"keywords": [],
"dependencies": {
"async-wait-until": "^2.0.18",
"eris": "^0.17.2",
"eris": "patch:eris@npm%3A0.18.0#~/.yarn/patches/eris-npm-0.18.0-57724b4df9.patch",
"fix-esm": "^1.0.1",
"md5": "^2.3.0",
"mongodb": "^6.12.0",
Expand All @@ -26,24 +27,23 @@
"promise-queue": "^2.2.5",
"slash-create": "^6.3.0",
"sprintf-js": "^1.1.3",
"status-client": "jimchen5209/StatusClient_JS#v2.2.1",
"tslog-helper": "jimchen5209/TSLog-Helper#v2.3.1"
"status-client": "jimchen5209/StatusClient_JS#v2.3.0",
"tslog": "^4.9.3"
},
"devDependencies": {
"@eslint/js": "^9.17.0",
"@stylistic/eslint-plugin": "^2.12.1",
"@types/md5": "^2.3.5",
"@types/node": "^22.10.2",
"@types/node-fetch": "^2.6.12",
"@types/node-schedule": "^2.1.7",
"@types/promise-queue": "^2.2.3",
"@types/sprintf-js": "^1.1.4",
"@types/ws": "^8.5.13",
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"eslint": "^9.16.0",
"typescript": "^5.7.2"
"eslint": "^9.17.0",
"globals": "^15.13.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.0"
},
"packageManager": "[email protected]",
"resolutions": {
"eris@^0.17.2": "patch:eris@npm%3A0.17.2#./.yarn/patches/eris-npm-0.17.2-40f32b9a18.patch"
}
"packageManager": "[email protected]"
}
Loading

0 comments on commit 3717764

Please sign in to comment.