-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
2,211 additions
and
2,146 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
|
@@ -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", | ||
|
@@ -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]" | ||
} |
Oops, something went wrong.