Skip to content

Create groups with 1 or 2 members #803

Closed Answered by 002-sans
002-sans asked this question in Q&A
Discussion options

You must be logged in to vote

with a small modification of the module, I see it's possible to create a group with only me.

Dir: ./src/managers/ChannelManager.js

-                                                BEFORE                                                         
  async createGroupDM(recipients) {
     // Check
    if (!Array.isArray(recipients)) throw new Error(`Expected an array of recipients (got ${typeof recipients})`);
    recipients = recipients
      .map(r => this.client.users.resolveId(r))
      .filter(r => r && this.client.relationships.cache.get(r) == RelationshipTypes.FRIEND);
    if (recipients.length < 2 || recipients.length > 9) throw new Error('Invalid Users length (2 - 9)');
    const data…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@aiko-chan-ai
Comment options

@002-sans
Comment options

Answer selected by 002-sans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants