2016-12-08 20:05:23 +01:00
|
|
|
package net.borken.commandes;
|
|
|
|
|
|
|
|
import net.borken.Commande;
|
|
|
|
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
|
2017-02-04 19:31:09 +01:00
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
|
|
|
2016-12-08 20:05:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by seb65 on 19/10/2016.
|
|
|
|
*/
|
|
|
|
public class PingCommande implements Commande {
|
|
|
|
|
|
|
|
|
|
|
|
private String HELP = "`//ping` \n :arrow_right:\t*Le bot vous répondra Pong!*";
|
|
|
|
@Override
|
|
|
|
public boolean called(String[] args, MessageReceivedEvent event) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void action(String[] args, MessageReceivedEvent event) {
|
|
|
|
|
|
|
|
event.getTextChannel().sendMessage(event.getAuthor().getAsMention()+" Pong!").queue();
|
2017-02-04 19:31:09 +01:00
|
|
|
LogManager.getLogger().info("pong");
|
2016-12-08 20:05:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String help(String[] args) {
|
|
|
|
|
|
|
|
return HELP;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void executed(boolean success, MessageReceivedEvent event)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|