-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with the channelUpdate event #7916
Comments
This is because discord.js/src/structures/GuildChannel.js Lines 146 to 149 in e3cbd45
discord.js/src/structures/Guild.js Lines 1409 to 1420 in e3cbd45
Because of this, both |
I suppose one way of working around this issue is to manually set the discord.js/src/structures/Base.js Lines 28 to 32 in e3cbd45
Something like: _update(data) {
const clone = this._clone();
Reflect.defineProperty(clone, 'position', { value: clone.position });
this._patch(data);
return clone;
} this would be done on the GuildChannel class, not Base However, this introduces some overhead on every channel update, and will still be prone to race conditions when multiple channels are updated at the same time |
I suppose a way around this is to use |
Yes... Cloning values works |
Can you confirm if this is fixed after this is now in main? #9497 |
resolved as of 09b0382 |
Which package is this bug report for?
discord.js
Issue description
I was willing to use the
GuildChannel.position
property for both theoldChannel
and thenewChannel
parameters, however, I've realised that both values return the same number.Code sample
Package version
V13.6.0
Node.js version
V18.0.0
Operating system
Windows 11 Pro
Priority this issue should have
Low (slightly annoying)
Which partials do you have configured?
User, Channel, GuildMember, Message, Reaction, GuildScheduledEvent, ThreadMember
Which gateway intents are you subscribing to?
Guilds, GuildMembers, GuildBans, GuildEmojisAndStickers, GuildIntegrations, GuildWebhooks, GuildInvites, GuildVoiceStates, GuildPresences, GuildMessages, GuildMessageReactions, GuildMessageTyping, DirectMessages, DirectMessageReactions, DirectMessageTyping, GuildScheduledEvents
I have tested this issue on a development release
No response
The text was updated successfully, but these errors were encountered: