Removed a file that was not meant to be pushed

Signed-off-by: Emotion <emotion@elliebot.net>
This commit is contained in:
Emotion 2023-08-21 23:27:00 +12:00
parent 9e5b7e0483
commit 51548ead98
No known key found for this signature in database
GPG key ID: 15EBDFF858B9A65A

View file

@ -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(...)
}
}
}