player.js
player.js copied to clipboard
TypeError: player is not a constructor
Hi, recently i want to make a discord bot, but this error just pops up and i don't think i can solve this.
const Discord = require("discord.js") const dotenv = require("dotenv") const { REST } = require("@discordjs/rest") const { Routes } = require('discord-api-types/v9') const fs = require("fs") const { player } = require ("discord-player")
dotenv.config() const TOKEN = process.env.TOKEN
const LOAD_SLASH = process.argv[2] == "load"
const CLIENT_ID = "1019987487554277486" const GUILD_ID ="789424249872973825"
const client = new Discord.Client({ intents: [ "GUILDS", "GUILD_VOICE_STATES", ] })
client.slashcommands = new Discord.Collection() client.player = new player(client, { ytdlOptions: { quality: "highestaudio", highWatermark: 1 << 25
ERROR------------
client.player = new player(client, { ^
TypeError: player is not a constructor
at Object.
@Frieslbelenoer The player object that you are importing is for a package called discord-player, which appears to be for playing music within discord.
Unrelated to Vimeo, as far as I can tell.