Merge Greg's branch into the master branch #291

Merged
greg6775 merged 6 commits from greg-dev into master 2020-01-01 15:12:59 +01:00
7 changed files with 5 additions and 7 deletions

View file

@ -19,7 +19,7 @@
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>4.1.0_88</version>
<version>4.1.0_90</version>
</dependency>
<dependency>
<groupId>org.json</groupId>

View file

@ -9,7 +9,6 @@ import net.dv8tion.jda.api.Permission;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
public class HelpCommand implements Command {

View file

@ -16,7 +16,7 @@ public class VolumeCommand implements Command {
if (event.getAudioManager().hasPlayer(event.getGuild()) && event.getAudioManager().getPlayer(event.getGuild()).getPlayingTrack() != null) {
try {
int volume = Integer.parseInt(args[0]);
if (volume < 200 && volume > 0 || event.getConfig().getOwners().contains(event.getAuthor().getId())) {
if (volume < 201 && volume > 0 || event.getConfig().getOwners().contains(event.getAuthor().getIdLong())) {
event.getAudioManager().getPlayer(event.getGuild()).setVolume(volume);
event.getTextChannel().sendMessage(event.getMessageEditor().getMessage(MessageEditor.MessageType.INFO,
"commands.music.volume.success.title", "",
@ -46,7 +46,7 @@ public class VolumeCommand implements Command {
@Override
public String description() {
return "Change the volume of the music.";
return "commands.music.volume.help.description";
}
@Override

View file

@ -2,7 +2,6 @@ package com.bbn.hadder.commands.owner;
import com.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.commands.general.HelpCommand;
import com.bbn.hadder.utils.MessageEditor.MessageType;
/*

View file

@ -18,7 +18,7 @@ public class VoiceLeaveListener extends ListenerAdapter {
@Override
public void onGuildVoiceLeave(GuildVoiceLeaveEvent event) {
if (new AudioManager().hasPlayer(event.getGuild()) && event.getChannelLeft().getMembers().equals(event.getGuild().getSelfMember())) {
if (audioManager.hasPlayer(event.getGuild()) && event.getChannelLeft().getMembers().equals(event.getGuild().getSelfMember())) {
audioManager.players.remove(event.getGuild().getId());
audioManager.getPlayer(event.getGuild()).destroy();
audioManager.getTrackManager(event.getGuild()).purgeQueue();

View file

@ -1,7 +1,6 @@
package com.bbn.hadder.utils;
import com.bbn.hadder.Rethink;
import com.bbn.hadder.commands.CommandEvent;
import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.User;

View file

@ -212,6 +212,7 @@ 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.error.int.description = The volume have to be between 1 and 200
commands.music.volume.help.description = Change the volume of the music.
commands.nsfw.gif.error.title = GIF not showing? Click here
commands.nsfw.img.error.title = Image not showing? Click here