Change error message

This commit is contained in:
Unknown 2017-12-01 15:02:35 +01:00
parent 8ce41f88f8
commit 878c0d1b3a
2 changed files with 12 additions and 6 deletions

View File

@ -4,13 +4,11 @@ import net.Broken.Commandes.Move;
import net.Broken.Commandes.Music; import net.Broken.Commandes.Music;
import net.Broken.Commandes.Spam; import net.Broken.Commandes.Spam;
import net.Broken.Outils.AntiSpam; import net.Broken.Outils.AntiSpam;
import net.Broken.Outils.EmbedMessageUtils;
import net.Broken.Outils.MessageTimeOut; import net.Broken.Outils.MessageTimeOut;
import net.Broken.Outils.Moderateur; import net.Broken.Outils.Moderateur;
import net.dv8tion.jda.core.JDA; import net.dv8tion.jda.core.JDA;
import net.dv8tion.jda.core.entities.ChannelType; import net.dv8tion.jda.core.entities.*;
import net.dv8tion.jda.core.entities.Guild;
import net.dv8tion.jda.core.entities.Member;
import net.dv8tion.jda.core.entities.TextChannel;
import net.dv8tion.jda.core.events.ExceptionEvent; import net.dv8tion.jda.core.events.ExceptionEvent;
import net.dv8tion.jda.core.events.ReadyEvent; import net.dv8tion.jda.core.events.ReadyEvent;
import net.dv8tion.jda.core.events.guild.member.GuildMemberJoinEvent; import net.dv8tion.jda.core.events.guild.member.GuildMemberJoinEvent;
@ -26,6 +24,9 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import sun.security.tools.keytool.Main; import sun.security.tools.keytool.Main;
import java.util.ArrayList;
import java.util.List;
/** /**
* Created by seb65 on 19/10/2016. * Created by seb65 on 19/10/2016.
@ -98,6 +99,7 @@ public class BotListener extends ListenerAdapter {
//On a detecter que c'etait une commande //On a detecter que c'etait une commande
//System.out.println(event.getMessage().getContent()); //System.out.println(event.getMessage().getContent());
MainBot.handleCommand(MainBot.parser.parse(event.getMessage().getContent(), event)); MainBot.handleCommand(MainBot.parser.parse(event.getMessage().getContent(), event));
} }
else if (!event.getMessage().getAuthor().getId().equals(event.getJDA().getSelfUser().getId())) else if (!event.getMessage().getAuthor().getId().equals(event.getJDA().getSelfUser().getId()))
{ {

View File

@ -12,6 +12,10 @@ public class EmbedMessageUtils {
public static MessageEmbed getUnknowCommand() { public static MessageEmbed getUnknowCommand() {
return new EmbedBuilder().setTitle(":warning: Commande inconnue! :warning:").setDescription(":arrow_right: Utilisez `//help` pour voirs les commandes disponible.").setColor(Color.orange).build(); return new EmbedBuilder().setTitle(":warning: Commande inconnue! :warning:").setDescription(":arrow_right: Utilisez `//help` pour voirs les commandes disponible.").setColor(Color.orange).build();
}
public static MessageEmbed getError(String message) {
return new EmbedBuilder().setTitle(":warning: Error! :warning:").setColor(Color.red).setDescription(message).build();
} }
public static MessageEmbed getNoPrivate(){ public static MessageEmbed getNoPrivate(){
@ -19,8 +23,8 @@ public class EmbedMessageUtils {
} }
public static MessageEmbed getMusicError(String mesage){ public static MessageEmbed getMusicError(String message){
return new EmbedBuilder().setTitle(":warning: Musique Error :warning:").setDescription(":arrow_right: "+mesage).setFooter("'//help music' pour plus d'info",null).setColor(Color.red).build(); return new EmbedBuilder().setTitle(":warning: Musique Error :warning:").setDescription(":arrow_right: "+message).setFooter("'//help music' pour plus d'info",null).setColor(Color.red).build();
} }