Ignore bots interacting with hideko

This commit is contained in:
Bea 2022-12-19 16:54:15 +01:00
parent 00441f089f
commit 982902fc6d

View File

@ -57,6 +57,9 @@ public class MessageCommandListener extends ListenerAdapter
@Override @Override
public void onMessageReceived(@NotNull MessageReceivedEvent event) public void onMessageReceived(@NotNull MessageReceivedEvent event)
{ {
// check if a bot is sending this message, and ignore it
if(event.getAuthor().isBot()) return;
// warning: we are getting the RAW value of the message content, not the DISPLAY value! // warning: we are getting the RAW value of the message content, not the DISPLAY value!
String eventMessage = event.getMessage().getContentRaw(); String eventMessage = event.getMessage().getContentRaw();