mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
22 lines
495 B
JavaScript
22 lines
495 B
JavaScript
'use strict';
|
|
|
|
const Action = require('./Action');
|
|
|
|
class GuildChannelsPositionUpdate extends Action {
|
|
handle(data) {
|
|
const client = this.client;
|
|
|
|
const guild = client.guilds.get(data.guild_id);
|
|
if (guild) {
|
|
for (const partialChannel of data.channels) {
|
|
const channel = guild.channels.get(partialChannel.id);
|
|
if (channel) channel.rawPosition = partialChannel.position;
|
|
}
|
|
}
|
|
|
|
return { guild };
|
|
}
|
|
}
|
|
|
|
module.exports = GuildChannelsPositionUpdate;
|