theelitemaster
theelitemaster
DIAdiscord.js - Imagine an app
Created by theelitemaster on 7/3/2023 in #djs-voice
Issue with ffmpeg/avconv
I am getting an error on line 6 because the @discordjs/voice module cannto be found despite being required and installed.
module.exports = {
name: "play",
description: "play",
async execute (client, message, args, Discord)
{
const {createAudioPlayer, joinVoiceChannel} = require("@discord.js/voice");

const AudioPlayerStatus = require('AudioPlayerStatus');

const player = createAudioPlayer();


const generalvc = "1062726237589602355";
const altvc = "1117625842403659858";
const altaltvc = "1092193592010887259";

const guild = client.guilds.cache.get("1062726236767535185");

const channel = guild.channels.cache.get(altvc);

const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator

});
player.play(createAudioResource("./audio/stare.mp3"));
connection.subscribe(player);
entersState(player, AudioPlayerStatus.Playing)

}
}
module.exports = {
name: "play",
description: "play",
async execute (client, message, args, Discord)
{
const {createAudioPlayer, joinVoiceChannel} = require("@discord.js/voice");

const AudioPlayerStatus = require('AudioPlayerStatus');

const player = createAudioPlayer();


const generalvc = "1062726237589602355";
const altvc = "1117625842403659858";
const altaltvc = "1092193592010887259";

const guild = client.guilds.cache.get("1062726236767535185");

const channel = guild.channels.cache.get(altvc);

const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator

});
player.play(createAudioResource("./audio/stare.mp3"));
connection.subscribe(player);
entersState(player, AudioPlayerStatus.Playing)

}
}
6 replies