mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 13:02:38 +00:00
Commit those in LF too
This commit is contained in:
parent
1897b4f4d6
commit
27114eebf9
2 changed files with 32 additions and 32 deletions
|
|
@ -1,21 +1,21 @@
|
|||
const Action = require('./Action');
|
||||
|
||||
class GuildRolesPositionUpdate extends Action {
|
||||
handle(data) {
|
||||
const client = this.client;
|
||||
|
||||
const guild = client.guilds.get(data.guild_id);
|
||||
if (guild) {
|
||||
for (const partialRole of data.roles) {
|
||||
const role = guild.roles.get(partialRole.id);
|
||||
if (role) role.position = partialRole.position;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
guild,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GuildRolesPositionUpdate;
|
||||
const Action = require('./Action');
|
||||
|
||||
class GuildRolesPositionUpdate extends Action {
|
||||
handle(data) {
|
||||
const client = this.client;
|
||||
|
||||
const guild = client.guilds.get(data.guild_id);
|
||||
if (guild) {
|
||||
for (const partialRole of data.roles) {
|
||||
const role = guild.roles.get(partialRole.id);
|
||||
if (role) role.position = partialRole.position;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
guild,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GuildRolesPositionUpdate;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
const AbstractHandler = require('./AbstractHandler');
|
||||
|
||||
class GuildEmojisUpdate extends AbstractHandler {
|
||||
handle(packet) {
|
||||
const client = this.packetManager.client;
|
||||
const data = packet.d;
|
||||
client.actions.GuildEmojisUpdate.handle(data);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GuildEmojisUpdate;
|
||||
const AbstractHandler = require('./AbstractHandler');
|
||||
|
||||
class GuildEmojisUpdate extends AbstractHandler {
|
||||
handle(packet) {
|
||||
const client = this.packetManager.client;
|
||||
const data = packet.d;
|
||||
client.actions.GuildEmojisUpdate.handle(data);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GuildEmojisUpdate;
|
||||
|
|
|
|||
Loading…
Reference in a new issue