mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
feat(Application): application flags (#5147)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const ClientApplication = require('../../../structures/ClientApplication');
|
||||
let ClientUser;
|
||||
|
||||
module.exports = (client, { d: data }, shard) => {
|
||||
@@ -7,9 +8,8 @@ module.exports = (client, { d: data }, shard) => {
|
||||
client.user._patch(data.user);
|
||||
} else {
|
||||
if (!ClientUser) ClientUser = require('../../../structures/ClientUser');
|
||||
const clientUser = new ClientUser(client, data.user);
|
||||
client.user = clientUser;
|
||||
client.users.cache.set(clientUser.id, clientUser);
|
||||
client.user = new ClientUser(client, data.user);
|
||||
client.users.cache.set(client.user.id, client.user);
|
||||
}
|
||||
|
||||
for (const guild of data.guilds) {
|
||||
@@ -17,5 +17,11 @@ module.exports = (client, { d: data }, shard) => {
|
||||
client.guilds.add(guild);
|
||||
}
|
||||
|
||||
if (client.application) {
|
||||
client.application._patch(data.application);
|
||||
} else {
|
||||
client.application = new ClientApplication(client, data.application);
|
||||
}
|
||||
|
||||
shard.checkReady();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user