This commit is contained in:
parent
e9f475cb59
commit
3ff154eec6
@ -145,7 +145,7 @@ public class ClearChatCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Button deleteButton = Button.danger("clear_delete", "Dismiss").withEmoji(Emoji.fromUnicode("❌"));
|
Button dismissButton = Button.danger("clear_dismiss", "Dismiss").withEmoji(Emoji.fromUnicode("❌"));
|
||||||
|
|
||||||
WebhookMessageEditAction<Message> webhookMessageEditAction;
|
WebhookMessageEditAction<Message> webhookMessageEditAction;
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ public class ClearChatCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
Message message = webhookMessageEditAction
|
Message message = webhookMessageEditAction
|
||||||
.setActionRow(deleteButton)
|
.setActionRow(dismissButton)
|
||||||
.complete();
|
.complete();
|
||||||
|
|
||||||
String replyMessageId = message.getId();
|
String replyMessageId = message.getId();
|
||||||
@ -177,7 +177,7 @@ public class ClearChatCommand
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteButton(ButtonInteractionEvent event)
|
public void dismissMessage(ButtonInteractionEvent event)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(!(Configuration.getDatabaseManager().isUserTrackedFor(event.getUser().getId(), event.getMessageId())))
|
if(!(Configuration.getDatabaseManager().isUserTrackedFor(event.getUser().getId(), event.getMessageId())))
|
||||||
|
@ -18,7 +18,7 @@ public class ButtonInteractionListener extends ListenerAdapter
|
|||||||
case "coinflip_reflip" -> new CoinFlipCommand().buttonReFlip(event);
|
case "coinflip_reflip" -> new CoinFlipCommand().buttonReFlip(event);
|
||||||
|
|
||||||
// clearchat command
|
// clearchat command
|
||||||
case "clear_delete" -> new ClearChatCommand().deleteButton(event);
|
case "clear_dismiss" -> new ClearChatCommand().dismissMessage(event);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user