You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Haha-Yes/node_modules/discord.js/src/client/actions/GuildChannelsPositionUpdate.js

20 lines
477 B
JavaScript

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.position = partialChannel.position;
}
}
return { guild };
}
}
module.exports = GuildChannelsPositionUpdate;