- refactor: rename `RelationshipsManager` > `RelationshipManager`

- feat(RelationshipManager): add `friendCache`, `blockedCache`, `incomingCache`, `outgoingCache`

- feat(ClientApplication): Add `popularCommands`

- deps: Update
This commit is contained in:
March 7th
2022-09-09 23:44:45 +07:00
parent af2a885f2a
commit fb71762d2d
7 changed files with 83 additions and 21 deletions

View File

@@ -1,5 +1,6 @@
'use strict';
const { Collection } = require('@discordjs/collection');
const Team = require('./Team');
const Application = require('./interfaces/Application');
const ApplicationCommandManager = require('../managers/ApplicationCommandManager');
@@ -107,6 +108,17 @@ class ClientApplication extends Application {
this.botPublic ??= null;
}
if ('popular_application_command_ids' in data) {
/**
* List of popular command
* @type {?Collection<Snowflake, ApplicationCommand>}
*/
this.popularCommands = new Collection();
data.popular_application_command_ids.forEach(id => {
this.popularCommands.set(id, this.commands.cache.get(id));
});
}
/**
* The owner of this OAuth application
* @type {?(User|Team)}