fix: opcode 24 (Interaction search function)
Todo: Rewrite slash command ...
This commit is contained in:
@@ -129,7 +129,6 @@ class ChannelManager extends CachedManager {
|
||||
// Check
|
||||
if (!recipients || !Array.isArray(recipients)) throw new Error('No recipients || Invalid Type (Array)');
|
||||
recipients = recipients.filter(r => r instanceof User && r.id && r.friend);
|
||||
console.log(recipients);
|
||||
if (recipients.length < 2 || recipients.length > 9) throw new Error('Invalid Users length (2 - 9)');
|
||||
const data = await this.client.api.users['@me'].channels.post({
|
||||
data: { recipients: recipients.map(r => r.id) },
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user