<commit_before>package kdkbot.discord;



import java.time.Instant;

import java.util.Date;

import java.util.Iterator;

import java.util.List;

import java.util.concurrent.TimeUnit;



import com.vdurmont.emoji.Emoji;

import com.vdurmont.emoji.EmojiManager;



import sx.blah.discord.api.events.EventSubscriber;

import sx.blah.discord.handle.impl.events.ReadyEvent;

import sx.blah.discord.handle.impl.events.guild.channel.message.MessageReceivedEvent;

import sx.blah.discord.handle.impl.obj.ReactionEmoji;

import sx.blah.discord.handle.obj.IChannel;

import sx.blah.discord.handle.obj.IMessage;

import sx.blah.discord.handle.obj.IRole;

import sx.blah.discord.util.MessageHistory;



public class Events {

	@EventSubscriber

	public void onReadyEvent(ReadyEvent e) {

		

	}

	

	@SuppressWarnings("deprecation")

	@EventSubscriber

	public void onMessageReceivedEvent(MessageReceivedEvent e) {

		// Proof of Concept Test

		// [Kal's Coffee@world-build-public] Kalbintion: Some Message

		if(e.getGuild().getName().equalsIgnoreCase("Kal's Coffee") &&

		   e.getChannel().getName().equalsIgnoreCase("warframe")) {

			

		} else if(e.getGuild().getName().equalsIgnoreCase("Kal's Coffee") &&

		   e.getChannel().getName().equalsIgnoreCase("wbp-jury")) {

			IChannel chanWBP = e.getGuild().getChannelByID(439191691195580417l);

			// IChannel chanWBPJ = e.getGuild().getChannelByID(434089649846222848l);

			IChannel chanWBPJ = e.getGuild().getChannelByID(437573865246294019l);

			if(e.getMessage().getContent().startsWith("|make ")) {

				String[] parts = e.getMessage().getContent().split(" ");

				Date start = new Date(2018 - 1900, Integer.parseInt(parts[1]) - 1, Integer.parseInt(parts[2]));

				Date end = new Date(2018 - 1900, Integer.parseInt(parts[3]) - 1, Integer.parseInt(parts[4]));

				Instant iStart = start.toInstant();

				Instant iEnd = end.toInstant();

				

				System.out.println(start.toString() + ":" + end.toString());

				System.out.println(iStart.toString() + ":" + iEnd.toString());


<commit_msg>Updated discord events class for additional temp testing stuff.<commit_after>package kdkbot.discord;



import java.time.Instant;

import java.util.ArrayList;

import java.util.Date;

import java.util.Iterator;

import java.util.concurrent.TimeUnit;



import com.google.gson.JsonObject;

import com.google.gson.JsonParser;

import com.vdurmont.emoji.EmojiManager;



import sx.blah.discord.api.events.EventSubscriber;

import sx.blah.discord.handle.impl.events.ReadyEvent;

import sx.blah.discord.handle.impl.events.guild.channel.message.MessageReceivedEvent;

import sx.blah.discord.handle.obj.IChannel;

import sx.blah.discord.handle.obj.IMessage;

import sx.blah.discord.util.MessageHistory;



public class Events {

	@EventSubscriber

	public void onReadyEvent(ReadyEvent e) {

		

	}

	

	@SuppressWarnings("deprecation")

	@EventSubscriber

	public void onMessageReceivedEvent(MessageReceivedEvent e) {

		// Proof of Concept Test

		// [Kal's Coffee@world-build-public] Kalbintion: Some Message

		if(e.getGuild().getName().equalsIgnoreCase("Kal's Coffee") &&

		   e.getChannel().getName().equalsIgnoreCase("warframe")) {

			if(e.getMessage().getContent().startsWith("!baro")) {

				IChannel chanWF = e.getGuild().getChannelByID(338627337224716299l);

				if(kdkbot.api.warframe.API.Warframe.isBaroHere()) {

					JsonParser parser = new JsonParser();

					ArrayList<String> baroManifest = kdkbot.api.warframe.API.Warframe.getBaroItemsReadable();

					String out = "BARO VISIT - " + kdkbot.api.warframe.API.Warframe.getBaroLocation() + "\r\n";

					

					if(baroManifest == null) { System.out.println("Baro Manifest Failed"); return; }

					System.out.println("Baro Manifest Size: " + baroManifest.size());

					

					for(String item : baroManifest) {

						JsonObject itm = parser.parse(item).getAsJsonObject();

						out += itm.get("Item").toString().replaceAll("\"", "") + " (" + itm.get("Ducats").toString().replaceAll("\"", "") + " <:du:421781169424564224>, " + itm.get("Credits").toString().replaceAll("\"", "") + " <:cr:421781138793562123>)\r\n";

					}

					

					System.out.println("[" + out.length() + "] " + out);

					

					chanWF.sendMessage(out);

				} else {

					chanWF.sendMessage("Baro is not yet here!");

				}

			}

		} else if(e.getGuild().getName().equalsIgnoreCase("Kal's Coffee") &&

		   e.getChannel().getName().equalsIgnoreCase("wbp-jury")) {

			IChannel chanWBP = e.getGuild().getChannelByID(439191691195580417l);

			// IChannel chanWBPJ = e.getGuild().getChannelByID(434089649846222848l);

			IChannel chanWBPJ = e.getGuild().getChannelByID(437573865246294019l);

			if(e.getMessage().getContent().startsWith("|make ")) {

				String[] parts = e.getMessage().getContent().split(" ");

				Date start = new Date(2018 - 1900, Integer.parseInt(parts[1]) - 1, Integer.parseInt(parts[2]));

				Date end = new Date(2018 - 1900, Integer.parseInt(parts[3]) - 1, Integer.parseInt(parts[4]));

				Instant iStart = start.toInstant();

				Instant iEnd = end.toInstant();

				

				System.out.println(start.toString() + ":" + end.toString());

				System.out.println(iStart.toString() + ":" + iEnd.toString());



{'fraction_non_alphanumeric': 0.5736178467507275, 'fraction_numerical': 0.019980601357904946, 'mean_word_length': 9.0791788856305, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4799077', 'n_tokens_mistral': 10232, 'n_tokens_neox': 10230, 'n_words': 258}