Search in sources :

Example 1 with DunctebotConfig

use of ml.duncte123.skybot.objects.config.DunctebotConfig in project SkyBot by duncte123.

the class LavalinkManager method start.

public void start(DunctebotConfig config, AudioUtils audioUtils) {
    this.config = config;
    this.audioUtils = audioUtils;
    if (!isEnabled()) {
        return;
    }
    final String userId = getIdFromToken(this.config.discord.token);
    lavalink = new JdaLavalink(userId, this.config.discord.totalShards, shardId -> SkyBot.getInstance().getShardManager().getShardById(shardId));
    loadNodes();
}
Also used : Link(lavalink.client.io.Link) AudioUtils(ml.duncte123.skybot.utils.AudioUtils) VoiceChannel(net.dv8tion.jda.api.entities.VoiceChannel) JdaLavalink(lavalink.client.io.jda.JdaLavalink) DunctebotConfig(ml.duncte123.skybot.objects.config.DunctebotConfig) AudioManager(net.dv8tion.jda.api.managers.AudioManager) Base64(java.util.Base64) Guild(net.dv8tion.jda.api.entities.Guild) LavalinkRegion(lavalink.client.io.LavalinkRegion) SkyBot(ml.duncte123.skybot.SkyBot) LavalinkPlayer(lavalink.client.player.LavalinkPlayer) URI(java.net.URI) Nonnull(javax.annotation.Nonnull) AirUtils(ml.duncte123.skybot.utils.AirUtils) JdaLavalink(lavalink.client.io.jda.JdaLavalink)

Example 2 with DunctebotConfig

use of ml.duncte123.skybot.objects.config.DunctebotConfig in project SkyBot by DuncteBot.

the class LavalinkManager method start.

public void start(DunctebotConfig config, AudioUtils audioUtils) {
    this.config = config;
    this.audioUtils = audioUtils;
    if (!isEnabled()) {
        return;
    }
    final String userId = getIdFromToken(this.config.discord.token);
    lavalink = new JdaLavalink(userId, this.config.discord.totalShards, shardId -> SkyBot.getInstance().getShardManager().getShardById(shardId));
    loadNodes();
}
Also used : Link(lavalink.client.io.Link) AudioUtils(ml.duncte123.skybot.utils.AudioUtils) VoiceChannel(net.dv8tion.jda.api.entities.VoiceChannel) JdaLavalink(lavalink.client.io.jda.JdaLavalink) DunctebotConfig(ml.duncte123.skybot.objects.config.DunctebotConfig) AudioManager(net.dv8tion.jda.api.managers.AudioManager) Base64(java.util.Base64) Guild(net.dv8tion.jda.api.entities.Guild) LavalinkRegion(lavalink.client.io.LavalinkRegion) SkyBot(ml.duncte123.skybot.SkyBot) LavalinkPlayer(lavalink.client.player.LavalinkPlayer) URI(java.net.URI) Nonnull(javax.annotation.Nonnull) AirUtils(ml.duncte123.skybot.utils.AirUtils) JdaLavalink(lavalink.client.io.jda.JdaLavalink)

Aggregations

URI (java.net.URI)2 Base64 (java.util.Base64)2 Nonnull (javax.annotation.Nonnull)2 LavalinkRegion (lavalink.client.io.LavalinkRegion)2 Link (lavalink.client.io.Link)2 JdaLavalink (lavalink.client.io.jda.JdaLavalink)2 LavalinkPlayer (lavalink.client.player.LavalinkPlayer)2 SkyBot (ml.duncte123.skybot.SkyBot)2 DunctebotConfig (ml.duncte123.skybot.objects.config.DunctebotConfig)2 AirUtils (ml.duncte123.skybot.utils.AirUtils)2 AudioUtils (ml.duncte123.skybot.utils.AudioUtils)2 Guild (net.dv8tion.jda.api.entities.Guild)2 VoiceChannel (net.dv8tion.jda.api.entities.VoiceChannel)2 AudioManager (net.dv8tion.jda.api.managers.AudioManager)2