Compare commits

...

2 Commits

Author SHA1 Message Date
495f164552 Ignore bots interacting with hideko
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-19 16:54:15 +01:00
fd100649a7 Remove unneeded todo 2022-12-19 16:48:20 +01:00
2 changed files with 3 additions and 3 deletions

View File

@ -72,9 +72,6 @@ public class ClearCommand implements MessageCommand
// edit the message text and attach a button.
Button dismiss = ClearChat.getDismissButton();
// ^ todo: maybe the dismiss button should also delete the original message sent by the user?
// todo: but then, we need to differentiate between command type in the database, and store
// todo: that message's id too.
Message finalMessage = event.getChannel().sendMessage(content).setActionRow(dismiss).complete();
// add the message to database.

View File

@ -57,6 +57,9 @@ public class MessageCommandListener extends ListenerAdapter
@Override
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!
String eventMessage = event.getMessage().getContentRaw();