diff --git a/src/Player.ts b/src/Player.ts index 1058b8c..b7b81d4 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -1,4 +1,4 @@ -import { Client, Collection, GuildResolvable, Snowflake, User, VoiceState } from "discord.js"; +import { Client, Collection, GuildResolvable, Snowflake, User, VoiceState, Intents } from "discord.js"; import { TypedEmitter as EventEmitter } from "tiny-typed-emitter"; import { Queue } from "./Structures/Queue"; import { VoiceUtils } from "./VoiceInterface/VoiceUtils"; @@ -46,6 +46,10 @@ class Player extends EventEmitter { */ this.client = client; + if (new Intents(this.client.options.intents).has(Intents.FLAGS.GUILD_VOICE_STATES)) { + throw new PlayerError('client is missing "GUILD_VOICE_STATES" intent'); + } + /** * The extractors collection * @type {ExtractorModel}