commit
eb4930be22
1 changed files with 40 additions and 35 deletions
|
|
@ -4,6 +4,7 @@ import com.bbn.hadder.commands.Command;
|
||||||
import com.bbn.hadder.commands.CommandEvent;
|
import com.bbn.hadder.commands.CommandEvent;
|
||||||
import com.bbn.hadder.utils.MessageEditor;
|
import com.bbn.hadder.utils.MessageEditor;
|
||||||
import net.dv8tion.jda.api.EmbedBuilder;
|
import net.dv8tion.jda.api.EmbedBuilder;
|
||||||
|
import net.dv8tion.jda.api.Permission;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
@ -13,6 +14,7 @@ public class HelpCommand implements Command {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void executed(String[] args, CommandEvent event) {
|
public void executed(String[] args, CommandEvent event) {
|
||||||
|
if (event.getGuild().getSelfMember().hasPermission(Permission.MESSAGE_EMBED_LINKS)) {
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
HashMap<String, ArrayList<Command>> hashMap = new HashMap<>();
|
HashMap<String, ArrayList<Command>> hashMap = new HashMap<>();
|
||||||
for (Command cmd : event.getCommandHandler().getCommandList()) {
|
for (Command cmd : event.getCommandHandler().getCommandList()) {
|
||||||
|
|
@ -55,6 +57,9 @@ public class HelpCommand implements Command {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
event.getTextChannel().sendMessage("I need the Embed Links Permission to send the Help Menu!").queue();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue