From 3047890b0eda3ea46d13d09082f373a8c4a6a7cb Mon Sep 17 00:00:00 2001 From: Charlie Morley Date: Fri, 11 Feb 2022 00:00:00 -0700 Subject: [PATCH] setemoji quick message improvement for DMs --- .../jmusicbot/commands/owner/SetemojiCmd.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/jagrosh/jmusicbot/commands/owner/SetemojiCmd.java b/src/main/java/com/jagrosh/jmusicbot/commands/owner/SetemojiCmd.java index e050dec7c..2bcec65c4 100644 --- a/src/main/java/com/jagrosh/jmusicbot/commands/owner/SetemojiCmd.java +++ b/src/main/java/com/jagrosh/jmusicbot/commands/owner/SetemojiCmd.java @@ -456,10 +456,18 @@ private void updateEmojis(CommandEvent event, Guild guild, int iMessageType, Str if (m != null) { updateReactions.accept(m, (removeIgnore) -> selectEmojiAndContinue(event, guild, iMessageType, unionEmojisArr, null, m, messageText, removeIgnore)); } else { - event.reply(messageText, m2 -> { - if (add) updateReactions.accept(m2, (removeIgnore) -> selectEmojiAndContinue(event, guild, iMessageType, unionEmojisArr, null, m2, messageText, removeIgnore)); - else selectEmojiAndContinue(event, guild, iMessageType, unionEmojisArr, null, m2, messageText, null); - }); + if (!event.getChannelType().isGuild()) { + String text = messageText == null ? "" : messageText; + if (existingEmojis != null && existingEmojis.length != 0) { + text += "\nNew \""+messageTypes[iMessageType]+"\" list for "+(guild == null ? "all guilds" : guild.getName())+": "+String.join(", ", unionEmojisArr)+"."; + } + event.reply(text); + } else { + event.reply(messageText, m2 -> { + if (add) updateReactions.accept(m2, (removeIgnore) -> selectEmojiAndContinue(event, guild, iMessageType, unionEmojisArr, null, m2, messageText, removeIgnore)); + else selectEmojiAndContinue(event, guild, iMessageType, unionEmojisArr, null, m2, messageText, null); + }); + } } } }