Compare commits
2 Commits
b3990ff04f
...
495f164552
Author | SHA1 | Date | |
---|---|---|---|
495f164552 | |||
fd100649a7 |
@ -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.
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user