fix ring
This commit is contained in:
		@@ -105,11 +105,16 @@ class DMChannel extends Channel {
 | 
				
			|||||||
   */
 | 
					   */
 | 
				
			||||||
  call(options = {}) {
 | 
					  call(options = {}) {
 | 
				
			||||||
    return new Promise((resolve, reject) => {
 | 
					    return new Promise((resolve, reject) => {
 | 
				
			||||||
      this.client.api.channels(this.id).call.ring.post({
 | 
					      this.client.api
 | 
				
			||||||
 | 
					        .channels(this.id)
 | 
				
			||||||
 | 
					        .call.ring.post({
 | 
				
			||||||
          usingApplicationJson: true,
 | 
					          usingApplicationJson: true,
 | 
				
			||||||
          data: {
 | 
					          data: {
 | 
				
			||||||
            recipients: null,
 | 
					            recipients: null,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(e => {
 | 
				
			||||||
 | 
					          console.error('Emit ring error:', e.message);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      const connection = joinVoiceChannel({
 | 
					      const connection = joinVoiceChannel({
 | 
				
			||||||
        channelId: this.id,
 | 
					        channelId: this.id,
 | 
				
			||||||
@@ -141,7 +146,6 @@ class DMChannel extends Channel {
 | 
				
			|||||||
            self_video: false,
 | 
					            self_video: false,
 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
          if (this.shard.status !== Status.READY) return false;
 | 
					          if (this.shard.status !== Status.READY) return false;
 | 
				
			||||||
          console.log('DM channel send payload', data);
 | 
					 | 
				
			||||||
          this.shard.send(data);
 | 
					          this.shard.send(data);
 | 
				
			||||||
          return true;
 | 
					          return true;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -212,11 +212,16 @@ class PartialGroupDMChannel extends Channel {
 | 
				
			|||||||
   */
 | 
					   */
 | 
				
			||||||
  call(options = {}) {
 | 
					  call(options = {}) {
 | 
				
			||||||
    return new Promise((resolve, reject) => {
 | 
					    return new Promise((resolve, reject) => {
 | 
				
			||||||
      this.client.api.channels(this.id).call.ring.post({
 | 
					      this.client.api
 | 
				
			||||||
 | 
					        .channels(this.id)
 | 
				
			||||||
 | 
					        .call.ring.post({
 | 
				
			||||||
          usingApplicationJson: true,
 | 
					          usingApplicationJson: true,
 | 
				
			||||||
          data: {
 | 
					          data: {
 | 
				
			||||||
            recipients: null,
 | 
					            recipients: null,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(e => {
 | 
				
			||||||
 | 
					          console.error('Emit ring error:', e.message);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      const connection = joinVoiceChannel({
 | 
					      const connection = joinVoiceChannel({
 | 
				
			||||||
        channelId: this.id,
 | 
					        channelId: this.id,
 | 
				
			||||||
@@ -248,7 +253,6 @@ class PartialGroupDMChannel extends Channel {
 | 
				
			|||||||
            self_video: false,
 | 
					            self_video: false,
 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
          if (this.shard.status !== Status.READY) return false;
 | 
					          if (this.shard.status !== Status.READY) return false;
 | 
				
			||||||
          console.log('DM channel send payload', data);
 | 
					 | 
				
			||||||
          this.shard.send(data);
 | 
					          this.shard.send(data);
 | 
				
			||||||
          return true;
 | 
					          return true;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user