This is the error I get :
SyntaxError: Cannot use import statement outside a module
.on("queueEnd", (player) => {
let QueueEmbed = new MessageEmbed()
.setAuthor({
name: "The queue has ended",
iconURL: this.botconfig.IconURL,
})
.setColor(this.botconfig.EmbedColor)
.setTimestamp();
client.channels.cache
.get(player.textChannel)
.send({ embeds: [QueueEmbed] });
})
if (!this.botconfig["24/7"]) {
setTimeout(() => {
if (player.paused || player.playing || player.queue.length > 0) return;
player.destroy();
},2*60*1000//time in milliseconds ;-; 2 minutes
)};
}
Whenever you use the import (or export) keywords, you will need to make sure that the file containing these keywords is a module. A common way of making a mistake in this respect is to create a <script> tag in your HTML without a type="module" attribute.
Read more here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules