=Added LavaPlayer dependency
LavaPlayer dependency for audio importing and sending through discord
This commit is contained in:
+2
-1
@@ -24,6 +24,7 @@
|
|||||||
<classpathentry kind="lib" path="lib/commons-collections4-4.3.jar"/>
|
<classpathentry kind="lib" path="lib/commons-collections4-4.3.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/commons-lang3-3.9.jar"/>
|
<classpathentry kind="lib" path="lib/commons-lang3-3.9.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/commons-text-1.6.jar"/>
|
<classpathentry kind="lib" path="lib/commons-text-1.6.jar"/>
|
||||||
<classpathentry kind="lib" path="C:/Users/Rin/Documents/Java/KittyBot/lib/google-api-services-youtube-v3-rev212-1.25.0.jar"/>
|
<classpathentry kind="lib" path="lib/google-api-services-youtube-v3-rev212-1.25.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/lavaplayer-1.3.19.jar"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|||||||
Binary file not shown.
@@ -23,4 +23,4 @@ public class CommandMusicMain extends Command
|
|||||||
{
|
{
|
||||||
framework.run(guild, channel, user, input).Call(res);
|
framework.run(guild, channel, user, input).Call(res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,9 @@ import java.util.concurrent.Semaphore;
|
|||||||
|
|
||||||
import javax.security.auth.login.LoginException;
|
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 core.lua.PluginManager;
|
||||||
import dataStructures.*;
|
import dataStructures.*;
|
||||||
import main.Main;
|
import main.Main;
|
||||||
@@ -51,6 +54,9 @@ public class ObjectBuilderFactory
|
|||||||
// Command manager
|
// Command manager
|
||||||
private static CommandManager commandManager;
|
private static CommandManager commandManager;
|
||||||
|
|
||||||
|
//Audio track manager
|
||||||
|
AudioPlayerManager audioPlayer = new DefaultAudioPlayerManager();
|
||||||
|
|
||||||
// Localization classes - these are singletons, but should be initialized before almost all other
|
// 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.
|
// things so their inclusion in the factory is to ensure they're started at the correct time.
|
||||||
@SuppressWarnings("unused") private static LocStrings locStrings;
|
@SuppressWarnings("unused") private static LocStrings locStrings;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package utils;
|
package utils;
|
||||||
|
|
||||||
|
import com.sedmelluq.discord.lavaplayer.player.AudioPlayer;
|
||||||
|
|
||||||
import net.dv8tion.jda.core.entities.Guild;
|
import net.dv8tion.jda.core.entities.Guild;
|
||||||
import net.dv8tion.jda.core.entities.VoiceChannel;
|
import net.dv8tion.jda.core.entities.VoiceChannel;
|
||||||
import net.dv8tion.jda.core.managers.AudioManager;
|
import net.dv8tion.jda.core.managers.AudioManager;
|
||||||
@@ -8,10 +10,14 @@ public class AudioUtils
|
|||||||
{
|
{
|
||||||
private Guild guild;
|
private Guild guild;
|
||||||
AudioManager audio;
|
AudioManager audio;
|
||||||
public AudioUtils(Guild guild)
|
AudioPlayer player;
|
||||||
|
|
||||||
|
|
||||||
|
public AudioUtils(Guild guild, AudioPlayer player)
|
||||||
{
|
{
|
||||||
this.guild = guild;
|
this.guild = guild;
|
||||||
audio = guild.getAudioManager();
|
audio = guild.getAudioManager();
|
||||||
|
this.player = player;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean joinChannel(String channelName)
|
public boolean joinChannel(String channelName)
|
||||||
|
|||||||
Reference in New Issue
Block a user