=Added LavaPlayer dependency
LavaPlayer dependency for audio importing and sending through discord
This commit is contained in:
@@ -23,4 +23,4 @@ public class CommandMusicMain extends Command
|
||||
{
|
||||
framework.run(guild, channel, user, input).Call(res);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,9 @@ import java.util.concurrent.Semaphore;
|
||||
|
||||
import javax.security.auth.login.LoginException;
|
||||
|
||||
import com.sedmelluq.discord.lavaplayer.player.AudioPlayerManager;
|
||||
import com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager;
|
||||
|
||||
import core.lua.PluginManager;
|
||||
import dataStructures.*;
|
||||
import main.Main;
|
||||
@@ -51,6 +54,9 @@ public class ObjectBuilderFactory
|
||||
// Command manager
|
||||
private static CommandManager commandManager;
|
||||
|
||||
//Audio track manager
|
||||
AudioPlayerManager audioPlayer = new DefaultAudioPlayerManager();
|
||||
|
||||
// Localization classes - these are singletons, but should be initialized before almost all other
|
||||
// things so their inclusion in the factory is to ensure they're started at the correct time.
|
||||
@SuppressWarnings("unused") private static LocStrings locStrings;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package utils;
|
||||
|
||||
import com.sedmelluq.discord.lavaplayer.player.AudioPlayer;
|
||||
|
||||
import net.dv8tion.jda.core.entities.Guild;
|
||||
import net.dv8tion.jda.core.entities.VoiceChannel;
|
||||
import net.dv8tion.jda.core.managers.AudioManager;
|
||||
@@ -8,10 +10,14 @@ public class AudioUtils
|
||||
{
|
||||
private Guild guild;
|
||||
AudioManager audio;
|
||||
public AudioUtils(Guild guild)
|
||||
AudioPlayer player;
|
||||
|
||||
|
||||
public AudioUtils(Guild guild, AudioPlayer player)
|
||||
{
|
||||
this.guild = guild;
|
||||
audio = guild.getAudioManager();
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
public boolean joinChannel(String channelName)
|
||||
|
||||
Reference in New Issue
Block a user