refactor: switch api and gateway to V8 (#4879)

Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
This commit is contained in:
Sugden
2021-02-11 17:10:35 +00:00
committed by GitHub
parent ae3c3d80ee
commit ee5bc1a5c4
33 changed files with 372 additions and 364 deletions

View File

@@ -245,7 +245,7 @@ class User extends Base {
recipient_id: this.id,
},
});
return this.client.actions.ChannelCreate.handle(data).channel;
return this.client.channels.add(data);
}
/**
@@ -255,8 +255,9 @@ class User extends Base {
async deleteDM() {
const { dmChannel } = this;
if (!dmChannel) throw new Error('USER_NO_DMCHANNEL');
const data = await this.client.api.channels(dmChannel.id).delete();
return this.client.actions.ChannelDelete.handle(data).channel;
await this.client.api.channels(dmChannel.id).delete();
this.client.channels.remove(dmChannel.id);
return dmChannel;
}
/**