Merge remote-tracking branch 'origin/master' into hax-dev

This commit is contained in:
Hax 2020-01-20 17:53:40 +01:00
commit 7feaefdd4e
4 changed files with 63 additions and 59 deletions

View file

@ -16,7 +16,6 @@ import net.dv8tion.jda.api.entities.Activity;
import net.dv8tion.jda.api.sharding.DefaultShardManagerBuilder;
import net.dv8tion.jda.api.sharding.ShardManager;
import javax.security.auth.login.LoginException;
import java.util.List;
public class Hadder {

View file

@ -53,7 +53,7 @@ public class AudioManager {
public AudioPlayer createPlayer(Guild guild) {
AudioPlayer nPlayer = myManager.createPlayer();
TrackManager manager = new TrackManager(nPlayer);
TrackManager manager = new TrackManager(nPlayer, this);
nPlayer.addListener(manager);
guild.getAudioManager().setSendingHandler(new AudioPlayerSendHandler(nPlayer));
players.put(guild.getId(), new AbstractMap.SimpleEntry<>(nPlayer, manager));

View file

@ -18,10 +18,12 @@ import java.util.concurrent.LinkedBlockingQueue;
public class TrackManager extends AudioEventAdapter {
private final AudioPlayer player;
private final AudioManager manager;
private final Queue<AudioInfo> queue;
private boolean loop = false;
public TrackManager(AudioPlayer player) {
public TrackManager(AudioPlayer player, AudioManager manager) {
this.manager = manager;
this.player = player;
this.queue = new LinkedBlockingQueue<>();
}
@ -48,13 +50,16 @@ public class TrackManager extends AudioEventAdapter {
@Override
public void onTrackEnd(AudioPlayer player, AudioTrack track, AudioTrackEndReason endReason) {
Guild g = queue.poll().getAuthor().getGuild();
if (loop) {
player.playTrack(track.makeClone());
} else if (queue.isEmpty()) {
Guild g = queue.poll().getAuthor().getGuild();
manager.players.remove(g.getId());
manager.getPlayer(g).destroy();
manager.getTrackManager(g).purgeQueue();
g.getAudioManager().closeAudioConnection();
} else {
player.playTrack(queue.element().getTrack().makeClone());
player.playTrack(queue.element().getTrack());
}
}

View file

@ -130,13 +130,13 @@ commands.moderation.rules.setup.title = Richte Regeln ein
commands.moderation.rules.setup.description = Welcome to the Hadder rules setup. Please mention the channel in which I should send the rules. Your message should look like\: \#rules or \#verify.
commands.moderation.rules.channel.error.title = Kanal konnte nicht gefunden werden
commands.moderation.rules.channel.error.description = Ich kann den angegebenen Kanal nicht finden. Bitte starte das Setup erneut.
commands.moderation.rules.rules.title = Rules message
commands.moderation.rules.rules.title = Regeln Nachricht
commands.moderation.rules.rules.description = Der Kanal wurde erfolgreich auf %extra% gesetzt. Bitte senden Sie mir jetzt die Regeln.
commands.moderation.rules.role.title = Role to assign/remove
commands.moderation.rules.role.title = Rolle zum Zuweisen/Entfernen
commands.moderation.rules.role.description = The rules were successfully set. Please send me the name of the role which the user receives/loses after he accepted the rules.
commands.moderation.rules.role.error.title = Rolle existiert nicht
commands.moderation.rules.role.error.description = The specified role does not exist on this guild.
commands.moderation.rules.role.permission.error.title = No permission
commands.moderation.rules.role.permission.error.title = Keine Berechtigung
commands.moderation.rules.role.permission.error.description = You cannot select this role because you cannot interact with it.
commands.moderation.rules.guild.error.title = Falsche Guild
commands.moderation.rules.guild.error.description = The mentioned channel must be on this guild\!
@ -150,48 +150,48 @@ commands.moderation.rules.emote.error.equal.description = The 1st and 2nd emote
commands.moderation.rules.emoji.decline.description = The first emote has been successfully set. Please send me now the decline emote.
commands.moderation.rules.emoji.error.description = The given emote can't be used.
commands.moderation.rules.success.title = Successfully set the rules
commands.moderation.rules.success.description = I successfully send the rules in %extra%.
commands.moderation.rules.error.message.title = Can't write messages
commands.moderation.rules.error.message.description = I can not write messages in the specified channel
commands.moderation.rules.error.permission.title = No permission
commands.moderation.rules.error.permission.description = To execute this command, I need the `MANAGE_ROLES` permission.
commands.moderation.rules.success.description = Ich habe die Regeln erfolgreich in %extra% gesendet.
commands.moderation.rules.error.message.title = Kann keine Nachrichten schreiben
commands.moderation.rules.error.message.description = Ich kann keine Nachrichten in dem angegebenen Kanal schreiben
commands.moderation.rules.error.permission.title = Keine Berechtigung
commands.moderation.rules.error.permission.description = Um diesen Befehl auszuführen, benötige ich die `MANAGE_ROLES` Berechtigung.
commands.moderation.rules.error.interact.title = Can't interact
commands.moderation.rules.error.interact.description = I can not interact with the specified role. Make sure my role is higher than the specified role.
commands.moderation.rules.help.description = Setup the rules on your Discord server
commands.moderation.starboard.success.title = Successfully set the Channel\!
commands.moderation.starboard.help.description = Sets the starboard channel.
commands.moderation.editrules.channel.title = Rules channel
commands.moderation.editrules.channel.title = Regeln Kanal
commands.moderation.editrules.channel.description = Please send me the channel with the rules as mention
commands.moderation.editrules.channel.found.error.title = Kanal konnte nicht gefunden werden
commands.moderation.editrules.channel.found.error.description = I can't find the specified channel. Please start the edit process again.
commands.moderation.editrules.channel.message.error.title = No rules message
commands.moderation.editrules.channel.message.error.description = I can not find the rules message in the specified channel.
commands.moderation.editrules.message.title = New message
commands.moderation.editrules.channel.message.error.title = Keine Regeln Nachricht
commands.moderation.editrules.channel.message.error.description = Ich kann die Regel Nachricht in dem angegebenen Kanal nicht finden.
commands.moderation.editrules.message.title = Neue Nachricht
commands.moderation.editrules.message.description = Please send me the new rules message now.
commands.moderation.editrules.error.title = No rules
commands.moderation.editrules.error.title = Keine Regeln
commands.moderation.editrules.error.description = There is nor rules message in this server. Please setup the rules first with %extra%rules
commands.moderation.editrules.success.title = Successfully changed
commands.moderation.editrules.success.title = Erfolgreich geändert
commands.moderation.editrules.success.description = I successfully changed the rules
commands.moderation.editrules.help.description = Edits the rules message.
commands.music.bass.error.connected.title = No channel
commands.music.bass.error.connected.description = You have to be in the same voice channel as the bot to change the bass level.
commands.music.bass.error.connected.title = Kein Kanal
commands.music.bass.error.connected.description = Du musst im selben Sprachkanal wie der Bot sein, um den Bass-Level zu ändern.
commands.music.bass.help.description = Change the bass for the song which is played at the moment.
commands.music.join.success.title = Successfully connected
commands.music.join.success.title = Erfolgreich verbunden
commands.music.join.success.description = Ich habe mich erfolgreich mit %extra% verbunden.
commands.music.join.error.connecting.already.title = Already connected
commands.music.join.error.connecting.already.title = Bereits verbunden
commands.music.join.error.connecting.already.description = Ich bin bereits mit deinem Sprachkanal verbunden
commands.music.join.error.connecting.trying.title = Verbindung wird bereits hergestellt
commands.music.join.error.connecting.trying.description = Hadder versucht bereits, sich zu verbinden. Bitte warten Sie einen Moment
commands.music.join.error.channel.title = Kein Sprachkanal
commands.music.join.error.channel.description = Du befindest dich nicht in einem Sprachkanal.
commands.music.join.error.permission.title = No permission
commands.music.join.error.permission.title = Keine Berechtigung
commands.music.join.error.permission.description = I am not allowed to join your voice channel.
commands.music.join.help.description = Tritt deinem Sprachkanal bei.
commands.music.leave.success.title = Verbindung erfolgreich getrennt
commands.music.leave.success.description = Ich habe die Verbindung zum Sprachkanal erfolgreich getrennt
commands.music.leave.error.channel.title = No channel
commands.music.leave.error.channel.description = You have to be in the same voice channel as the bot.
commands.music.leave.error.channel.title = Kein Kanal
commands.music.leave.error.channel.description = Du musst im selben Sprachkanal wie der Bot sein.
commands.music.leave.error.connected.tile = Nicht verbunden
commands.music.leave.error.connected.description = Ich bin derzeit in keinem Sprachkanal auf dieser Guild
commands.music.leave.help.description = Leaves your voice channel.
@ -206,19 +206,19 @@ commands.music.play.error.load.title = %extra% Laden fehlgeschlagen %extra%
commands.music.play.error.load.description = Leider kann ich das angegebene Lied nicht laden
commands.music.play.error.match.title = %extra% No matches %extra%
commands.music.play.error.match.description = Ich kann keinen Song mit diesem Namen auf YouTube finden
commands.music.play.success.unpause.title = Successfully continued
commands.music.play.success.unpause.title = Erfolgreich fortgesetzt
commands.music.play.success.unpause.description = I successfully continued playing the song.
commands.music.play.error.connected.title = No channel
commands.music.play.error.connected.description = You have to be in the same voice channel as the bot to continue the song.
commands.music.play.error.connected.title = Kein Kanal
commands.music.play.error.connected.description = Du musst im selben Sprachkanal wie der Bot sein, um den Song fortzusetzen.
commands.music.play.help.description = Spielt den angegebenen Song ab.
commands.music.stop.success.title = Erfolgreich gestoppt
commands.music.stop.success.description = Ich habe den Song erfolgreich gestoppt.
commands.music.stop.error.connected.title = No channel
commands.music.stop.error.connected.title = Kein Kanal
commands.music.stop.error.connected.description = You have to be in the same voice channel as the bot to stop the song.
commands.music.stop.help.description = Stoppt den Song.
commands.music.info.success.title = Track info
commands.music.info.error.title = No playing track
commands.music.info.error.description = I am not playing anything at the moment
commands.music.info.error.description = Ich spiele im Moment nichts
commands.music.info.help.description = Zeigt Informationen über das abgespielte Lied.
commands.music.queue.error.title = Keine Warteschlange
commands.music.queue.error.description = Momentan sind keine Lieder in der Warteschlange
@ -227,30 +227,30 @@ commands.music.queue.success.description = This is the queue\: \n %extra%
commands.music.queue.help.description = Shows the music queue.
commands.music.skip.success.title = Erfolgreich übersprungen
commands.music.skip.success.description = Ich habe erfolgreich zum nächsten Song übersprungen
commands.music.skip.error.connected.title = No channel
commands.music.skip.error.connected.description = You have to be in the same voice channel as the bot to skip the song.
commands.music.skip.error.connected.title = Kein Kanal
commands.music.skip.error.connected.description = Du musst im selben Sprachkanal wie der Bot sein, um das Lied zu überspringen.
commands.music.skip.help.description = Überspringt den gerade abgespielten Song.
commands.music.volume.success.title = Successfully set
commands.music.volume.success.description = I successfully set the new volume to %extra%
commands.music.volume.error.int.title = Invalid number
commands.music.volume.success.title = Erfolgreich festgelegt
commands.music.volume.success.description = Die Lautstärke wurde erfolgreich auf %extra% gesetzt
commands.music.volume.error.int.title = Ungültige Nummer
commands.music.volume.error.int.description = Die Lautstärke muss zwischen 1 und 200 liegen
commands.music.volume.error.connected.title = No channel
commands.music.volume.error.connected.description = You have to be in the same voice channel as the bot to change the volume.
commands.music.volume.help.description = Change the volume of the music.
commands.music.pause.success.title = Successfully paused
commands.music.pause.success.description = I successfully paused the played song.
commands.music.pause.error.paused.title = Already paused
commands.music.pause.error.paused.description = The song is already paused.
commands.music.pause.error.connected.title = No channel
commands.music.pause.error.connected.description = You have to be in the same voice channel as the bot to pause the song.
commands.music.pause.help.description = Pause the playing song.
commands.music.volume.error.connected.title = Kein Kanal
commands.music.volume.error.connected.description = Du musst im selben Sprachkanal wie der Bot sein, um die Lautstärke zu ändern.
commands.music.volume.help.description = Ändere die Lautstärke der Musik.
commands.music.pause.success.title = Erfolgreich pausiert
commands.music.pause.success.description = Ich habe den gespielten Song erfolgreich pausiert.
commands.music.pause.error.paused.title = Bereits pausiert
commands.music.pause.error.paused.description = Das Lied ist bereits pausiert.
commands.music.pause.error.connected.title = Kein Kanal
commands.music.pause.error.connected.description = Du musst im selben Sprachkanal wie der Bot sein, um den Song zu pausieren.
commands.music.pause.help.description = Pausiere das abgespielte Lied.
commands.music.loop.success.loop.title = Erfolgreich aktiviert
commands.music.loop.success.loop.description = I will now repeat the currently played song.
commands.music.loop.success.loop.description = Ich wiederhole nun den gerade gespielten Song.
commands.music.loop.success.unloop.title = Erfolgreich deaktiviert
commands.music.loop.success.unloop.description = I will no longer repeat the currently played song.
commands.music.loop.error.connected.title = No channel
commands.music.loop.success.unloop.description = Ich werde den gerade gespielten Song nicht mehr wiederholen.
commands.music.loop.error.connected.title = Kein Kanal
commands.music.loop.error.connected.description = You have to be in the same voice channel as the bot to set the repeat status.
commands.music.loop.help.description = Repeats a song/queue.
commands.music.loop.help.description = Wiederholt ein Lied/Warteschlange.
commands.nsfw.gif.error.title = GIF wird nicht angezeigt? Klicke hier
commands.nsfw.img.error.title = Bild wird nicht angezeigt? Klicke hier
@ -261,13 +261,13 @@ commands.nsfw.boobs.help.description = Zeigt einen zufälligen Boob GIF.
commands.nsfw.cum.help.description = Zeigt einen zufälligen Cum GIF.
commands.nsfw.erotic.help.description = Zeigt ein zufälliges Erotik Bild
commands.nsfw.feet.help.description = Zeigt einen zufälligen Feet GIF.
commands.nsfw.fingering.help.description = Shows a random fingering gif.
commands.nsfw.linking.help.description = Shows a random licking gif.
commands.nsfw.fingering.help.description = Zeigt einen zufälligen fingering GIF.
commands.nsfw.linking.help.description = Zeigt ein zufälliges licking GIF.
commands.nsfw.porn.help.description = Zeigt einen zufälligen Porn GIF.
commands.nsfw.pussy.help.description = Zeigt einen zufälligen Pussy GIF.
commands.nsfw.randomporn.help.description = Zeigt ein völlig zufälliges Porno GIF.
commands.nsfw.solo.help.description = Zeigt einen zufälligen Solo GIF.
commands.nsfw.spank.help.description = Shows a random spank gif.
commands.nsfw.spank.help.description = Zeigt ein zufälliges spank GIF.
commands.nsfw.trans.help.description = Zeigt ein zufälliges Trans Bild
commands.owner.eval.success.title = Eval Command
@ -280,16 +280,16 @@ commands.owner.guildleave.success.description = Ich habe %extra% erfolgreich ver
commands.owner.guildleave.error.title = Verlassen nicht möglich
commands.owner.guildleave.error.description = I can not leave from this guild. Maybe this isn't a ID?
commands.owner.guildleave.help.description = Quit from a guild
commands.owner.reboot.help.description = Restart the bot
commands.owner.reboot.help.description = Starte den Bot neu
commands.owner.shutdown.success.title = Fährt herrunter
commands.owner.shutdown.help.description = Shuts the Bot down
commands.owner.shutdown.help.description = Schalte den Bot ab
commands.owner.test.success = TEST my friends
commands.owner.test.help.description = Just a little Test Command
commands.owner.blacklist.help.description = Blacklist a user for specific commands
commands.settings.language.success.title = Language set
commands.settings.language.success.title = Sprache festgelegt
commands.settings.language.success.description = `%extra%` is your new language now.
commands.settings.language.help.description = Führt den angegebenen Code aus.
commands.settings.prefix.success.title = %extra% Successfully set %extra%
commands.settings.prefix.success.description = I successfully set the new prefix for you to `%extra%`.
commands.settings.prefix.help.description = Sets a new prefix.
commands.settings.prefix.success.title = Erfolgreich festgelegt
commands.settings.prefix.success.description = Ich habe erfolgreich das neue Prefix für dich auf `%extra% `gesetzt.
commands.settings.prefix.help.description = Legt ein neues Prefix fest.