tinify webpacks (#1975)

* tinify webpack

* meme

* fix long version

* more changes

* even smoler

* fix up logic

* fix build

* undo changes to user agent manager because its not webpack'd anymore

* the heck

* fix stupid

* clean up browser rules

* typo
This commit is contained in:
Gus Caplan
2017-09-26 00:18:12 -05:00
committed by Crawl
parent 4d4d2f2db7
commit 27ccad1f1c
21 changed files with 85 additions and 80 deletions

View File

@@ -1,5 +1,6 @@
const GuildChannel = require('./GuildChannel');
const Collection = require('../util/Collection');
const { browser } = require('../util/Constants');
const { Error } = require('../errors');
/**
@@ -59,7 +60,7 @@ class VoiceChannel extends GuildChannel {
* @readonly
*/
get joinable() {
if (this.client.browser) return false;
if (browser) return false;
if (!this.permissionsFor(this.client.user).has('CONNECT')) return false;
if (this.full && !this.permissionsFor(this.client.user).has('MOVE_MEMBERS')) return false;
return true;
@@ -115,7 +116,7 @@ class VoiceChannel extends GuildChannel {
* .catch(console.error);
*/
join() {
if (this.client.browser) return Promise.reject(new Error('VOICE_NO_BROWSER'));
if (browser) return Promise.reject(new Error('VOICE_NO_BROWSER'));
return this.client.voice.joinChannel(this);
}
@@ -126,7 +127,7 @@ class VoiceChannel extends GuildChannel {
* voiceChannel.leave();
*/
leave() {
if (this.client.browser) return;
if (browser) return;
const connection = this.client.voice.connections.get(this.guild.id);
if (connection && connection.channel.id === this.id) connection.disconnect();
}