Adding gif on unautorized command

This commit is contained in:
BrokenFire 2018-02-27 16:16:41 +01:00
parent 9e73cf016d
commit 5f5fc3ab16
2 changed files with 7 additions and 4 deletions

View File

@ -43,6 +43,7 @@ public class MainBot {
public static int messageTimeOut = 10;
public static int gifMessageTimeOut = 30;
private static Logger logger = LogManager.getLogger();
@ -129,7 +130,7 @@ public class MainBot {
}
else{
Message msg = cmd.event.getTextChannel().sendMessage(EmbedMessageUtils.getUnautorized()).complete();
new MessageTimeOut(messageTimeOut, msg, cmd.event.getMessage()).start();
new MessageTimeOut(gifMessageTimeOut, msg, cmd.event.getMessage()).start();
}
}
@ -142,8 +143,10 @@ public class MainBot {
MessageReceivedEvent event = cmd.event;
if(event.isFromType(ChannelType.PRIVATE))
event.getPrivateChannel().sendMessage(EmbedMessageUtils.getUnknowCommand()).queue();
else
event.getTextChannel().sendMessage(EmbedMessageUtils.getUnknowCommand()).queue();
else {
Message message = event.getTextChannel().sendMessage(EmbedMessageUtils.getUnknowCommand()).complete();
new MessageTimeOut(messageTimeOut, message, event.getMessage());
}
logger.warn("Commande inconnue");
}

View File

@ -94,7 +94,7 @@ public class EmbedMessageUtils {
}
public static MessageEmbed getUnautorized(){
return buildStandar(getError("Vous n'avez pas l'autorisation de faire ça!"));
return buildStandar(getError("Vous n'avez pas l'autorisation de faire ça!").setImage("https://i.imgur.com/0OSsdvW.gif"));
}
public static MessageEmbed getHelpList(String role, String list) throws FileNotFoundException {