refactor(Queue): remove mute/unmute

This commit is contained in:
DevAndromeda 2021-08-12 16:07:43 +05:45
parent 417d0c5071
commit 6439590e28
No known key found for this signature in database
GPG key ID: FA40E3EC5CB6DCD6
2 changed files with 3 additions and 21 deletions

View file

@ -79,8 +79,8 @@
"@favware/rollup-type-bundler": "^1.0.3", "@favware/rollup-type-bundler": "^1.0.3",
"@types/node": "^16.4.13", "@types/node": "^16.4.13",
"@types/ws": "^7.4.7", "@types/ws": "^7.4.7",
"@typescript-eslint/eslint-plugin": "^4.29.0", "@typescript-eslint/eslint-plugin": "^4.29.1",
"@typescript-eslint/parser": "^4.29.0", "@typescript-eslint/parser": "^4.29.1",
"discord-api-types": "^0.22.0", "discord-api-types": "^0.22.0",
"discord.js": "^13.0.1", "discord.js": "^13.0.1",
"eslint": "^7.32.0", "eslint": "^7.32.0",
@ -89,7 +89,7 @@
"jsdoc-babel": "^0.5.0", "jsdoc-babel": "^0.5.0",
"prettier": "^2.3.2", "prettier": "^2.3.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-node": "^10.1.0", "ts-node": "^10.2.0",
"typescript": "^4.3.5" "typescript": "^4.3.5"
} }
} }

View file

@ -315,24 +315,6 @@ class Queue<T = unknown> {
this.setVolume(amount); this.setVolume(amount);
} }
/**
* Mutes the playback
* @returns {void}
*/
mute() {
const lv = this.#lastVolume;
this.volume = 0;
this.#lastVolume = lv;
}
/**
* Unmutes the playback. If the last volume was set to 0, unmute will produce no effect.
* @returns {void}
*/
unmute() {
this.volume = this.#lastVolume;
}
/** /**
* The stream time of this queue * The stream time of this queue
* @type {number} * @type {number}