diff --git a/DiscordDivaBot/munimuni.jar b/DiscordDivaBot/munimuni.jar index e5f8db4..7b30890 100644 Binary files a/DiscordDivaBot/munimuni.jar and b/DiscordDivaBot/munimuni.jar differ diff --git a/DiscordDivaBot/src/sig/DivaBot.java b/DiscordDivaBot/src/sig/DivaBot.java index e12723a..6f64512 100644 --- a/DiscordDivaBot/src/sig/DivaBot.java +++ b/DiscordDivaBot/src/sig/DivaBot.java @@ -70,9 +70,15 @@ public class DivaBot extends ListenerAdapter{ /*ev.getChannel().sendMessage(ev.getAuthor().getName()+" typed '"+ev.getMessage().getContentDisplay()+"'!") .queue();*/ //System.out.println(bot.getEmotes()); - ev.getChannel().addReactionById(ev.getMessageIdLong(), ChooseRandomMuniEmote(ev.getMessage().getContentDisplay().hashCode()+ - ev.getAuthor().getIdLong())) - .queue(); + if (ev.getMessage().getContentDisplay().toLowerCase().contains("nyoc") ) { + ev.getChannel().addReactionById(ev.getMessageIdLong(), ChooseRandomNyochioEmote(ev.getMessage().getContentDisplay().hashCode()+ + ev.getAuthor().getIdLong())) + .queue(); + } else { + ev.getChannel().addReactionById(ev.getMessageIdLong(), ChooseRandomMuniEmote(ev.getMessage().getContentDisplay().hashCode()+ + ev.getAuthor().getIdLong())) + .queue(); + } //messageHistory.put(ev.getMessageIdLong(),ev.getMessage()); } } @@ -88,6 +94,18 @@ public class DivaBot extends ListenerAdapter{ Random r = new Random(seed); return muniEmotes.get((int)(r.nextDouble()*muniEmotes.size())); } + + private Emote ChooseRandomNyochioEmote(long seed) { + List emotes = bot.getEmotes(); + List muniEmotes = new ArrayList(); + for (Emote e : emotes) { + if (e.getName().toLowerCase().contains("nyochio")) { + muniEmotes.add(e); + } + } + Random r = new Random(seed); + return muniEmotes.get((int)(r.nextDouble()*muniEmotes.size())); + } /*@Override public void onMessageDelete(MessageDeleteEvent ev) { @@ -108,6 +126,7 @@ public class DivaBot extends ListenerAdapter{ message.toLowerCase().contains("muni")|| message.toLowerCase().contains("むに")|| message.toLowerCase().contains("무니")|| + message.toLowerCase().contains("nyoc")|| (message.toLowerCase().contains("vj")||message.toLowerCase().contains("visual")))); }