fix: opcode 24 (Interaction search function)

Todo: Rewrite slash command ...
This commit is contained in:
March 7th
2022-06-12 19:13:12 +07:00
parent 8eaa5e0c72
commit 07d52ee41b
11 changed files with 45 additions and 54 deletions

View File

@@ -26,6 +26,14 @@ class RelationshipsManager {
this._setup(users);
}
/**
* Return array of cache
* @returns {Array<{id: Snowflake, type: RelationshipTypes}>}
*/
toArray() {
return this.cache.map((value, key) => ({ id: key, type: RelationshipTypes[value] }));
}
/**
* @private
* @param {Array<User>} users An array of users to add to the cache