Error FFmpegavconv not found!
This is my first time using this and I'm not sure if I've even done it right,
I'm getting the error
Error: FFmpeg/avconv not found!
from:
const { Client, SlashCommandBuilder } = require('discord.js')
const { createAudioPlayer, createAudioResource } = require('@discordjs/voice');
module.exports = {
data: new SlashCommandBuilder()
.setName('anthem')
.setDescription('Let the athem play!'),
async execute(interaction, client) {
const connection1 = client.channels.cache.get('1033420771294461952');
const player = createAudioPlayer();
const resource = createAudioResource('../FrenchAnthem.mp3');
player.play(resource);
connection1.subscribe(player);
interaction.reply("Anthem playing in <#1033420771294461952>")
},
};
const { Client, SlashCommandBuilder } = require('discord.js')
const { createAudioPlayer, createAudioResource } = require('@discordjs/voice');
module.exports = {
data: new SlashCommandBuilder()
.setName('anthem')
.setDescription('Let the athem play!'),
async execute(interaction, client) {
const connection1 = client.channels.cache.get('1033420771294461952');
const player = createAudioPlayer();
const resource = createAudioResource('../FrenchAnthem.mp3');
player.play(resource);
connection1.subscribe(player);
interaction.reply("Anthem playing in <#1033420771294461952>")
},
};
3 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
no?
okay
i was really stupid
and missed half of the guide
ok it has started to jion the channel and idk what to do now im confused
const { Client, SlashCommandBuilder } = require('discord.js')
const { createAudioPlayer, createAudioResource, generateDependencyReport, joinVoiceChannel } = require('@discordjs/voice');
console.log(generateDependencyReport());
module.exports = {
data: new SlashCommandBuilder()
.setName('anthem')
.setDescription('Let the athem play!'),
async execute(interaction, client) {
const channel = client.channels.cache.get('1033420771294461952');
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
});
const player = createAudioPlayer();
const subscription = connection.subscribe(audioPlayer);
const resource = createAudioResource('../FrenchAnthem.mp3');
player.play(resource);
connection.subscribe(player);
if (subscription) {
// Unsubscribe after 5 seconds (stop playing audio on the voice connection)
setTimeout(() => subscription.unsubscribe(), 5_000);
}
interaction.reply("Anthem playing in <#1033420771294461952>")
},
};
const { Client, SlashCommandBuilder } = require('discord.js')
const { createAudioPlayer, createAudioResource, generateDependencyReport, joinVoiceChannel } = require('@discordjs/voice');
console.log(generateDependencyReport());
module.exports = {
data: new SlashCommandBuilder()
.setName('anthem')
.setDescription('Let the athem play!'),
async execute(interaction, client) {
const channel = client.channels.cache.get('1033420771294461952');
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
});
const player = createAudioPlayer();
const subscription = connection.subscribe(audioPlayer);
const resource = createAudioResource('../FrenchAnthem.mp3');
player.play(resource);
connection.subscribe(player);
if (subscription) {
// Unsubscribe after 5 seconds (stop playing audio on the voice connection)
setTimeout(() => subscription.unsubscribe(), 5_000);
}
interaction.reply("Anthem playing in <#1033420771294461952>")
},
};
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View