feat: new class Call

This commit is contained in:
Elysia
2023-03-05 17:05:40 +07:00
parent 11ac55fcf0
commit ee906b544e
7 changed files with 94 additions and 15 deletions

View File

@@ -471,7 +471,7 @@ class User extends Base {
* @returns {Promise<boolean>}
*/
ring() {
if (!this.dmChannel?.id) return Promise.reject(new Error('USER_NO_DM_CHANNEL'));
if (this.relationships !== 'FRIEND') return Promise.reject(new Error('USER_NOT_FRIEND'));
if (!this.client.user.voice?.channelId || !this.client.callVoice) {
return Promise.reject(new Error('CLIENT_NO_CALL'));
}