mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 05:22:15 +00:00
use LF instead of CRLF (#1392)
This commit is contained in:
parent
0d83f80fc0
commit
5e522e0a2e
5 changed files with 56 additions and 54 deletions
|
|
@ -36,6 +36,8 @@
|
|||
}
|
||||
}],
|
||||
|
||||
"linebreak-style": ["error", "unix"],
|
||||
|
||||
"accessor-pairs": "warn",
|
||||
"array-callback-return": "error",
|
||||
"complexity": "warn",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
const AbstractHandler = require('./AbstractHandler');
|
||||
|
||||
class MessageReactionAddHandler extends AbstractHandler {
|
||||
handle(packet) {
|
||||
const client = this.packetManager.client;
|
||||
const data = packet.d;
|
||||
client.actions.MessageReactionAdd.handle(data);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = MessageReactionAddHandler;
|
||||
const AbstractHandler = require('./AbstractHandler');
|
||||
|
||||
class MessageReactionAddHandler extends AbstractHandler {
|
||||
handle(packet) {
|
||||
const client = this.packetManager.client;
|
||||
const data = packet.d;
|
||||
client.actions.MessageReactionAdd.handle(data);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = MessageReactionAddHandler;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
const AbstractHandler = require('./AbstractHandler');
|
||||
|
||||
class MessageReactionRemove extends AbstractHandler {
|
||||
handle(packet) {
|
||||
const client = this.packetManager.client;
|
||||
const data = packet.d;
|
||||
client.actions.MessageReactionRemove.handle(data);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = MessageReactionRemove;
|
||||
const AbstractHandler = require('./AbstractHandler');
|
||||
|
||||
class MessageReactionRemove extends AbstractHandler {
|
||||
handle(packet) {
|
||||
const client = this.packetManager.client;
|
||||
const data = packet.d;
|
||||
client.actions.MessageReactionRemove.handle(data);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = MessageReactionRemove;
|
||||
|
|
|
|||
Loading…
Reference in a new issue