Skip to content

Commit

Permalink
Loading arrow for thread pings
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Jul 19, 2024
1 parent 2ca3700 commit b4e8fed
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import net.dv8tion.jda.api.requests.ErrorResponse;
import net.neoforged.camelot.Database;
import net.neoforged.camelot.db.transactionals.ThreadPingsDAO;
import net.neoforged.camelot.util.Emojis;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -77,7 +78,7 @@ public void onEvent(@NotNull GenericEvent gevent) {
LOGGER.warn("Bot user lacks Mention Everyone permission for thread {}; role adding may not work properly", thread.getId());
}

thread.sendMessage("A new thread! Adding some people into here...")
thread.sendMessage("A new thread! Adding some people into here... " + Emojis.LOADING_SPINNER.getFormatted())
.setSuppressedNotifications(true)
.setAllowedMentions(Set.of(MentionType.ROLE))
.delay(Duration.ofSeconds(3))
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/net/neoforged/camelot/util/Emojis.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ public class Emojis {
public static final Emoji CMDLINE = MANAGER.getLazyEmoji("cmdline");
public static final Emoji ADD = MANAGER.getLazyEmoji("add");
public static final Emoji NO_RESULTS = MANAGER.getLazyEmoji("noresults");

public static final Emoji LOADING_SPINNER = MANAGER.getLazyEmoji("loadingarrow");
}
3 changes: 3 additions & 0 deletions src/main/resources/emojis/emojis.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ cmdline=cmdline.png
add=add.png
noresults=noresults.png

# Animated
loadingarrow=loadingarrow.gif

# Pagination
prevpage=prevpage.png
nextpage=nextpage.png
Expand Down
Binary file added src/main/resources/emojis/loadingarrow.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b4e8fed

Please sign in to comment.