fix idenify not being patched

This commit is contained in:
Cynthia Foxwell 2023-09-25 14:12:14 -06:00
parent 77706dde2c
commit 2e6383c493

View file

@ -127,7 +127,7 @@ instead("spawn", bot.shards, function (args, orig) {
const ret = orig.apply(this, args); const ret = orig.apply(this, args);
const shard = this.get(args[0]); const shard = this.get(args[0]);
if (shard) { if (shard) {
before("sendWS", shard.prototype, function ([op, _data]) { before("sendWS", shard.__proto__, function ([op, _data]) {
if (op === Dysnomia.Constants.GatewayOPCodes.IDENTIFY) { if (op === Dysnomia.Constants.GatewayOPCodes.IDENTIFY) {
_data.properties.browser = "Discord Embedded"; _data.properties.browser = "Discord Embedded";
delete _data.properties.device; delete _data.properties.device;