fix(event): userSettingsUpdate memory leak
This commit is contained in:
parent
977b2fb8a3
commit
21bbfe4aa2
@ -88,12 +88,11 @@ module.exports = (client, { d: data }, shard) => {
|
|||||||
for (const private_channel of data.private_channels) {
|
for (const private_channel of data.private_channels) {
|
||||||
client.channels._add(private_channel);
|
client.channels._add(private_channel);
|
||||||
}
|
}
|
||||||
// Start event
|
// Remove event because memory leak
|
||||||
client.on(Events.USER_SETTINGS_UPDATE, s => {
|
|
||||||
if (('status' in s || 'custom_status' in s) && client.options.readyStatus) {
|
if (client.options.readyStatus) {
|
||||||
client.customStatusAuto(client);
|
client.customStatusAuto(client);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read_state: Return Array:
|
* Read_state: Return Array:
|
||||||
|
@ -2,5 +2,8 @@
|
|||||||
const { Events } = require('../../../util/Constants');
|
const { Events } = require('../../../util/Constants');
|
||||||
module.exports = (client, { d: data }) => {
|
module.exports = (client, { d: data }) => {
|
||||||
client.setting._patch(data);
|
client.setting._patch(data);
|
||||||
|
if (('status' in data || 'custom_status' in data) && client.options.readyStatus) {
|
||||||
|
client.customStatusAuto(client);
|
||||||
|
}
|
||||||
return client.emit(Events.USER_SETTINGS_UPDATE, data);
|
return client.emit(Events.USER_SETTINGS_UPDATE, data);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user