diff --git a/BandoriBot/.classpath b/BandoriBot/.classpath index 758ba95..6bc46f2 100644 --- a/BandoriBot/.classpath +++ b/BandoriBot/.classpath @@ -1,7 +1,7 @@ - + diff --git a/BandoriBot/BandoriBot.jar b/BandoriBot/BandoriBot.jar index a7418b9..8d915ac 100644 Binary files a/BandoriBot/BandoriBot.jar and b/BandoriBot/BandoriBot.jar differ diff --git a/BandoriBot/src/sig/GachaBot.java b/BandoriBot/src/sig/GachaBot.java index d101e86..038b086 100644 --- a/BandoriBot/src/sig/GachaBot.java +++ b/BandoriBot/src/sig/GachaBot.java @@ -42,7 +42,9 @@ public class GachaBot { public static HashMap card_idmap = new HashMap(); public static HashMap> card_raritymap = new HashMap>(); public static HashMap> card_membermap = new HashMap>(); + public static HashMap gacha_reroll_timer = new HashMap(); public static Font programFont = new Font("Century Schoolbook L",Font.PLAIN,24); + final public static int GACHADELAY = 2000; public GachaBot(JDA bot) { this.bot=bot; UpdateCardDatabase(); @@ -94,6 +96,13 @@ public class GachaBot { .append("```").build()).queue(); }break; case ".gacha":{ + if (gacha_reroll_timer.containsKey(discordID)) { + if (gacha_reroll_timer.get(discordID)>System.currentTimeMillis()) { + gacha_reroll_timer.put(discordID,Math.min(gacha_reroll_timer.get(discordID)+500,System.currentTimeMillis()+GACHADELAY)); + return; + } + } + gacha_reroll_timer.put(discordID, System.currentTimeMillis()+GACHADELAY); //System.out.print("This is a gacha attempt~!"); int amt = 1; if (wordparse.length>1) {