mirror of
https://github.com/danbulant/discord.js
synced 2026-06-01 22:01:28 +00:00
21 lines
495 B
JavaScript
21 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;
|