Removed a file that was not meant to be pushed
Signed-off-by: Emotion <emotion@elliebot.net>
This commit is contained in:
parent
9e5b7e0483
commit
51548ead98
1 changed files with 0 additions and 25 deletions
|
@ -1,25 +0,0 @@
|
||||||
package net.elliebot.ellie.listeners;
|
|
||||||
|
|
||||||
import net.dv8tion.jda.api.entities.Message;
|
|
||||||
import net.dv8tion.jda.api.entities.MessageChannel;
|
|
||||||
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
|
|
||||||
import net.dv8tion.jda.api.hooks.ListenerAdapter;
|
|
||||||
|
|
||||||
public class EllieListener extends ListenerAdapter
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void onMessageReceived(MessageReceivedEvent event)
|
|
||||||
{
|
|
||||||
if (event.getAuthor().isBot()) return;
|
|
||||||
// We don't want to respond to other bot accounts, including ourself
|
|
||||||
Message message = event.getMessage();
|
|
||||||
String content = message.getContentRaw();
|
|
||||||
// getContentRaw() is an atomic getter
|
|
||||||
// getContentDisplay() is a lazy getter which modifies the content for e.g. console view (strip discord formatting)
|
|
||||||
if (content.equals("!ping"))
|
|
||||||
{
|
|
||||||
MessageChannel channel = event.getChannel();
|
|
||||||
channel.sendMessage("Pong!").queue(); // Important to call .queue() on the RestAction returned by sendMessage(...)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Reference in a new issue