mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
feat(Browser): remove browser � (#5113)
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const GuildChannel = require('./GuildChannel');
|
||||
const { Error } = require('../errors');
|
||||
const Collection = require('../util/Collection');
|
||||
const { browser } = require('../util/Constants');
|
||||
const Permissions = require('../util/Permissions');
|
||||
|
||||
/**
|
||||
@@ -74,7 +72,6 @@ class VoiceChannel extends GuildChannel {
|
||||
* @readonly
|
||||
*/
|
||||
get joinable() {
|
||||
if (browser) return false;
|
||||
if (!this.viewable) return false;
|
||||
if (!this.permissionsFor(this.client.user).has(Permissions.FLAGS.CONNECT, false)) return false;
|
||||
if (this.full && !this.permissionsFor(this.client.user).has(Permissions.FLAGS.MOVE_MEMBERS, false)) return false;
|
||||
@@ -130,7 +127,6 @@ class VoiceChannel extends GuildChannel {
|
||||
* .catch(console.error);
|
||||
*/
|
||||
join() {
|
||||
if (browser) return Promise.reject(new Error('VOICE_NO_BROWSER'));
|
||||
return this.client.voice.joinChannel(this);
|
||||
}
|
||||
|
||||
@@ -141,7 +137,6 @@ class VoiceChannel extends GuildChannel {
|
||||
* voiceChannel.leave();
|
||||
*/
|
||||
leave() {
|
||||
if (browser) return;
|
||||
const connection = this.client.voice.connections.get(this.guild.id);
|
||||
if (connection && connection.channel.id === this.id) connection.disconnect();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user