Moved createAudioResource from discord.js/voice to play function

This commit is contained in:
Christer Warén 2021-09-05 02:39:59 +03:00
parent 72d0054d25
commit 3fc28a79cb
3 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,5 @@
const {
createAudioPlayer,
createAudioResource,
getVoiceConnection,
joinVoiceChannel
} = require("@discordjs/voice");
@ -141,7 +140,7 @@ module.exports = {
radio.station = station;
radio.textChannel = interaction.channel;
radio.startTime = date.getTime();
play(interaction, interaction.guild, client, url, Discord);
client.funcs.play(interaction, interaction.guild, client, url, Discord);
return;
}

View File

@ -1,3 +1,7 @@
const {
createAudioResource
} = require("@discordjs/voice");
module.exports = async function play(interaction, guild, client, url, Discord) {
let message = {};
const radio = client.radio.get(guild.id);

View File

@ -1,7 +1,6 @@
import Discord from "discord.js";
const {
createAudioPlayer,
createAudioResource,
getVoiceConnection,
joinVoiceChannel
} = require("@discordjs/voice");