From b4e8fed7e52c0cd036fa7c7a10aebfb6c5a3b3b3 Mon Sep 17 00:00:00 2001 From: Matyrobbrt Date: Fri, 19 Jul 2024 20:04:39 +0300 Subject: [PATCH] Loading arrow for thread pings --- .../camelot/listener/ThreadPingsListener.java | 3 ++- .../java/net/neoforged/camelot/util/Emojis.java | 2 ++ src/main/resources/emojis/emojis.properties | 3 +++ src/main/resources/emojis/loadingarrow.gif | Bin 0 -> 10324 bytes 4 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/emojis/loadingarrow.gif diff --git a/src/main/java/net/neoforged/camelot/listener/ThreadPingsListener.java b/src/main/java/net/neoforged/camelot/listener/ThreadPingsListener.java index ace4af2..a6ad28f 100644 --- a/src/main/java/net/neoforged/camelot/listener/ThreadPingsListener.java +++ b/src/main/java/net/neoforged/camelot/listener/ThreadPingsListener.java @@ -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; @@ -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)) diff --git a/src/main/java/net/neoforged/camelot/util/Emojis.java b/src/main/java/net/neoforged/camelot/util/Emojis.java index f6bf0c1..ca493de 100644 --- a/src/main/java/net/neoforged/camelot/util/Emojis.java +++ b/src/main/java/net/neoforged/camelot/util/Emojis.java @@ -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"); } diff --git a/src/main/resources/emojis/emojis.properties b/src/main/resources/emojis/emojis.properties index 7e287f1..95e8d1c 100644 --- a/src/main/resources/emojis/emojis.properties +++ b/src/main/resources/emojis/emojis.properties @@ -4,6 +4,9 @@ cmdline=cmdline.png add=add.png noresults=noresults.png +# Animated +loadingarrow=loadingarrow.gif + # Pagination prevpage=prevpage.png nextpage=nextpage.png diff --git a/src/main/resources/emojis/loadingarrow.gif b/src/main/resources/emojis/loadingarrow.gif new file mode 100644 index 0000000000000000000000000000000000000000..c2bc21831eb9e38af2fcba2a85e7a5877b87d225 GIT binary patch literal 10324 zcmd^^RaD$zw&fwX2X_JlEi||j2=4Cg?hb_o3+`?Kf)?%`k^sRacol^Nr;tK}giLz% z?b|YI?(M$4dZyQ!RWJXCdfWT#v(N97SCkVHwhTx3!w*5F=TWWeiS8GcnyilY8z~K0 z9!_o~L<9r`x;tbH6a+*B_TS%s{Ohx)#FUze6TI@mHY3!F^}dIK=#TQ*drUF=;~ny~ z-4~NXuafqYfyYlXls{v7XyFRH^f~N|mx^A}RkWRm?;4Ts?#{ z;sfF@$cF+&@@w-y-LE*X5`njzu=onFy2eG@9*zmvK@LV@ZxUhM?Iu1j7YNn5=n04( zhqAuE41xhXPQW&MX{KUk+n;DQL~|^G7zX$?uIftD5So-yJ2+i34HXC{K~KIUeNNd< ziVh|hyKO4|7>qBayCaMDdHBhMoZPi-5w7w1?Mr1~i2uB`q9xq}=y8!iN=1biXTitk z(ypwKb^qE&*mF}kLF$&6LnzaF9!=z$&(&!Ea7Iz1YTHEVibbxDz8x?;o>`~e{8|?M zI$wiMu}xtt2EO+k_M+N$s-?oXb5y@$7orsbPB}9fEZ7+su1n)4_;`nHZ3!_rw;VQP zl$0}By&y7~;hxxJN4v0^i+=4*H;n8{zF4DL;CX_2<1k-h*qJR};O7W&;z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