Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
SypherrDev authored Feb 25, 2023
1 parent c58a562 commit 6258791
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions FakeDeafen.plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* @name FakeDeafen
* @author Sypherr
* @description Allows you to fake being deafened.
* @version 0.0.1
*/

module.exports = class ExamplePlugin {

start() {
var text = new TextDecoder("utf-8");
WebSocket.prototype.original = WebSocket.prototype.send;
WebSocket.prototype.send = function(data) {
if (Object.prototype.toString.call(data) === "[object ArrayBuffer]") {
if (text.decode(data).includes("self_deaf")) {
data = data.replace('"self_mute":false', 'NiceOneDiscord');
}
}
WebSocket.prototype.original.apply(this, [data]);
}
}

stop() {
WebSocket.prototype.send = WebSocket.prototype.original;
}
}

0 comments on commit 6258791

Please sign in to comment.