mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
Moved all error strings to src/errors/messages and a few other things (#1695)
* Added missing error messages As well as `Guild#setRolePosition` and `Guild#setChannelPosition`'s first arg validation And fixed a typo in `Guild#setChannelPosition` `roles` -> `channels` * Reverted collection and Util constructors * Removed leftover messages Should have been in the second commit. * It's a single invalid permission and removed unused flag error * Fix INVALID_TOKEN -> TOKEN_INVALID as of #1703
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const GuildChannel = require('./GuildChannel');
|
||||
const Collection = require('../util/Collection');
|
||||
const { Error } = require('../errors');
|
||||
|
||||
/**
|
||||
* Represents a guild voice channel on Discord.
|
||||
@@ -113,7 +114,7 @@ class VoiceChannel extends GuildChannel {
|
||||
* .catch(console.error);
|
||||
*/
|
||||
join() {
|
||||
if (this.client.browser) return Promise.reject(new Error('Voice connections are not available in browsers.'));
|
||||
if (this.client.browser) return Promise.reject(new Error('VOICE_NO_BROWSER'));
|
||||
return this.client.voice.joinChannel(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user