Skip to content

Commit

Permalink
Fix reminds not being dismissible
Browse files Browse the repository at this point in the history
Closes #11
  • Loading branch information
Matyrobbrt committed May 27, 2024
1 parent 5b3ed86 commit ae4d585
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/main/java/net/neoforged/camelot/db/schemas/Reminder.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
* @param time the time to send the reminder at
* @param reminder the text of the reminder
*/
public record Reminder(int id, long user, long channel, Instant time, String reminder) implements Runnable {
@Override
public void run() {

}
public record Reminder(int id, long user, long channel, Instant time, String reminder) {

public static final class Mapper implements RowMapper<Reminder> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void onEvent(@NotNull GenericEvent gevent) {

private static RestAction<?> deleteIf(final String targetId, final ButtonInteractionEvent event) {
if (canDelete(targetId, event)) {
return event.getMessage().delete().reason("User dismissed the message");
return event.deferEdit().flatMap(_ -> event.getMessage().delete().reason("User dismissed the message"));
} else {
return event.deferEdit();
}
Expand Down

0 comments on commit ae4d585

Please sign in to comment.