Search in sources :

Example 1 with SlashCommandEvent

use of com.demod.dcba.SlashCommandEvent in project Factorio-FBSR by demodude4u.

the class BlueprintBotDiscordService method handleBlueprintUpgradeBeltsCommand.

private void handleBlueprintUpgradeBeltsCommand(SlashCommandEvent event) {
    String content = event.getCommandString();
    Optional<Attachment> attachment = event.optParamAttachment("file");
    if (attachment.isPresent()) {
        content += " " + attachment.get().getUrl();
    }
    List<BlueprintStringData> blueprintStringDatas = BlueprintFinder.search(content, event.getReporting());
    int upgradedCount = 0;
    for (BlueprintStringData blueprintStringData : blueprintStringDatas) {
        for (Blueprint blueprint : blueprintStringData.getBlueprints()) {
            for (BlueprintEntity blueprintEntity : blueprint.getEntities()) {
                String upgradeName = upgradeBeltsEntityMapping.get(blueprintEntity.getName());
                if (upgradeName != null) {
                    blueprintEntity.json().put("name", upgradeName);
                    upgradedCount++;
                }
            }
        }
    }
    if (upgradedCount > 0) {
        for (BlueprintStringData blueprintStringData : blueprintStringDatas) {
            try {
                event.replyFile(BlueprintStringData.encode(blueprintStringData.json()).getBytes(), "blueprint.txt");
            } catch (IOException e) {
                event.getReporting().addException(e);
            }
        }
        event.reply("Upgraded " + upgradedCount + " entities.");
    } else if (blueprintStringDatas.stream().anyMatch(d -> !d.getBlueprints().isEmpty())) {
        event.replyIfNoException("I couldn't find anything to upgrade!");
    } else {
        event.replyIfNoException("No blueprint found!");
    }
}
Also used : OptionType(net.dv8tion.jda.api.interactions.commands.OptionType) Arrays(java.util.Arrays) EventReply(com.demod.dcba.EventReply) URL(java.net.URL) FBSR(com.demod.fbsr.FBSR) Permission(net.dv8tion.jda.api.Permission) SlashCommandHandler(com.demod.dcba.SlashCommandHandler) Field(net.dv8tion.jda.api.entities.MessageEmbed.Field) TextChannel(net.dv8tion.jda.api.entities.TextChannel) DataTable(com.demod.factorio.DataTable) RenderUtils(com.demod.fbsr.RenderUtils) JSONException(org.json.JSONException) Matcher(java.util.regex.Matcher) JSONObject(org.json.JSONObject) Map(java.util.Map) ZipEntry(java.util.zip.ZipEntry) WebUtils(com.demod.fbsr.WebUtils) Message(net.dv8tion.jda.api.entities.Message) BufferedImage(java.awt.image.BufferedImage) DataPrototype(com.demod.factorio.prototype.DataPrototype) LevenshteinDistance(org.apache.commons.text.similarity.LevenshteinDistance) Collectors(java.util.stream.Collectors) Config(com.demod.factorio.Config) BlueprintEntity(com.demod.fbsr.BlueprintEntity) List(java.util.List) FactorioData(com.demod.factorio.FactorioData) MessageCommandEvent(com.demod.dcba.MessageCommandEvent) Entry(java.util.Map.Entry) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) BlueprintStringData(com.demod.fbsr.BlueprintStringData) ZipOutputStream(java.util.zip.ZipOutputStream) Blueprint(com.demod.fbsr.Blueprint) ByteArrayOutputStream(java.io.ByteArrayOutputStream) HashMap(java.util.HashMap) Function(java.util.function.Function) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) WatchdogReporter(com.demod.fbsr.app.WatchdogService.WatchdogReporter) ImmutableList(com.google.common.collect.ImmutableList) AbstractIdleService(com.google.common.util.concurrent.AbstractIdleService) SlashCommandEvent(com.demod.dcba.SlashCommandEvent) SimpleEntry(java.util.AbstractMap.SimpleEntry) Attachment(net.dv8tion.jda.api.entities.Message.Attachment) MapVersion(com.demod.fbsr.MapVersion) OptionData(net.dv8tion.jda.api.interactions.commands.build.OptionData) CommandReporting(com.demod.dcba.CommandReporting) DCBA(com.demod.dcba.DCBA) IOException(java.io.IOException) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Utils(com.demod.factorio.Utils) DiscordBot(com.demod.dcba.DiscordBot) LuaValue(org.luaj.vm2.LuaValue) AutoCompleteHandler(com.demod.dcba.AutoCompleteHandler) MessageEmbed(net.dv8tion.jda.api.entities.MessageEmbed) ArrayDeque(java.util.ArrayDeque) BlueprintFinder(com.demod.fbsr.BlueprintFinder) ChunkingFilter(net.dv8tion.jda.api.utils.ChunkingFilter) JSONArray(org.json.JSONArray) BlueprintEntity(com.demod.fbsr.BlueprintEntity) Blueprint(com.demod.fbsr.Blueprint) Attachment(net.dv8tion.jda.api.entities.Message.Attachment) BlueprintStringData(com.demod.fbsr.BlueprintStringData) IOException(java.io.IOException) Blueprint(com.demod.fbsr.Blueprint)

Example 2 with SlashCommandEvent

use of com.demod.dcba.SlashCommandEvent in project Factorio-FBSR by demodude4u.

the class BlueprintBotDiscordService method handleBlueprintTotalsCommand.

private void handleBlueprintTotalsCommand(SlashCommandEvent event) {
    DataTable table;
    try {
        table = FactorioData.getTable();
    } catch (JSONException | IOException e1) {
        throw new InternalError(e1);
    }
    String content = event.getCommandString();
    Optional<Attachment> attachment = event.optParamAttachment("file");
    if (attachment.isPresent()) {
        content += " " + attachment.get().getUrl();
    }
    List<BlueprintStringData> blueprintStringDatas = BlueprintFinder.search(content, event.getReporting());
    Map<String, Double> totalItems = new LinkedHashMap<>();
    for (BlueprintStringData blueprintStringData : blueprintStringDatas) {
        for (Blueprint blueprint : blueprintStringData.getBlueprints()) {
            Map<String, Double> items = FBSR.generateSummedTotalItems(table, blueprint);
            items.forEach((k, v) -> {
                totalItems.compute(k, ($, old) -> old == null ? v : old + v);
            });
        }
    }
    if (!totalItems.isEmpty()) {
        String responseContent = totalItems.entrySet().stream().sorted((e1, e2) -> e1.getKey().compareTo(e2.getKey())).map(e -> e.getKey() + ": " + RenderUtils.fmtDouble2(e.getValue())).collect(Collectors.joining("\n"));
        String response = "```ldif\n" + responseContent + "```";
        if (response.length() < 2000) {
            event.reply(response);
        } else {
            event.replyFile(responseContent.getBytes(), "totals.txt");
        }
    } else if (blueprintStringDatas.stream().anyMatch(d -> !d.getBlueprints().isEmpty())) {
        event.replyIfNoException("I couldn't find any items!");
    } else {
        event.replyIfNoException("No blueprint found!");
    }
}
Also used : OptionType(net.dv8tion.jda.api.interactions.commands.OptionType) Arrays(java.util.Arrays) EventReply(com.demod.dcba.EventReply) URL(java.net.URL) FBSR(com.demod.fbsr.FBSR) Permission(net.dv8tion.jda.api.Permission) SlashCommandHandler(com.demod.dcba.SlashCommandHandler) Field(net.dv8tion.jda.api.entities.MessageEmbed.Field) TextChannel(net.dv8tion.jda.api.entities.TextChannel) DataTable(com.demod.factorio.DataTable) RenderUtils(com.demod.fbsr.RenderUtils) JSONException(org.json.JSONException) Matcher(java.util.regex.Matcher) JSONObject(org.json.JSONObject) Map(java.util.Map) ZipEntry(java.util.zip.ZipEntry) WebUtils(com.demod.fbsr.WebUtils) Message(net.dv8tion.jda.api.entities.Message) BufferedImage(java.awt.image.BufferedImage) DataPrototype(com.demod.factorio.prototype.DataPrototype) LevenshteinDistance(org.apache.commons.text.similarity.LevenshteinDistance) Collectors(java.util.stream.Collectors) Config(com.demod.factorio.Config) BlueprintEntity(com.demod.fbsr.BlueprintEntity) List(java.util.List) FactorioData(com.demod.factorio.FactorioData) MessageCommandEvent(com.demod.dcba.MessageCommandEvent) Entry(java.util.Map.Entry) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) BlueprintStringData(com.demod.fbsr.BlueprintStringData) ZipOutputStream(java.util.zip.ZipOutputStream) Blueprint(com.demod.fbsr.Blueprint) ByteArrayOutputStream(java.io.ByteArrayOutputStream) HashMap(java.util.HashMap) Function(java.util.function.Function) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) WatchdogReporter(com.demod.fbsr.app.WatchdogService.WatchdogReporter) ImmutableList(com.google.common.collect.ImmutableList) AbstractIdleService(com.google.common.util.concurrent.AbstractIdleService) SlashCommandEvent(com.demod.dcba.SlashCommandEvent) SimpleEntry(java.util.AbstractMap.SimpleEntry) Attachment(net.dv8tion.jda.api.entities.Message.Attachment) MapVersion(com.demod.fbsr.MapVersion) OptionData(net.dv8tion.jda.api.interactions.commands.build.OptionData) CommandReporting(com.demod.dcba.CommandReporting) DCBA(com.demod.dcba.DCBA) IOException(java.io.IOException) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Utils(com.demod.factorio.Utils) DiscordBot(com.demod.dcba.DiscordBot) LuaValue(org.luaj.vm2.LuaValue) AutoCompleteHandler(com.demod.dcba.AutoCompleteHandler) MessageEmbed(net.dv8tion.jda.api.entities.MessageEmbed) ArrayDeque(java.util.ArrayDeque) BlueprintFinder(com.demod.fbsr.BlueprintFinder) ChunkingFilter(net.dv8tion.jda.api.utils.ChunkingFilter) JSONArray(org.json.JSONArray) DataTable(com.demod.factorio.DataTable) Blueprint(com.demod.fbsr.Blueprint) JSONException(org.json.JSONException) Attachment(net.dv8tion.jda.api.entities.Message.Attachment) BlueprintStringData(com.demod.fbsr.BlueprintStringData) IOException(java.io.IOException) LinkedHashMap(java.util.LinkedHashMap)

Example 3 with SlashCommandEvent

use of com.demod.dcba.SlashCommandEvent in project Factorio-FBSR by demodude4u.

the class BlueprintBotDiscordService method handleBlueprintBookExtractCommand.

private void handleBlueprintBookExtractCommand(SlashCommandEvent event) {
    String content = event.getCommandString();
    Optional<Attachment> attachment = event.optParamAttachment("file");
    if (attachment.isPresent()) {
        content += " " + attachment.get().getUrl();
    }
    List<BlueprintStringData> blueprintStringDatas = BlueprintFinder.search(content, event.getReporting());
    List<Blueprint> blueprints = blueprintStringDatas.stream().flatMap(bs -> bs.getBlueprints().stream()).collect(Collectors.toList());
    List<Entry<String, String>> links = new ArrayList<>();
    for (Blueprint blueprint : blueprints) {
        try {
            blueprint.json().remove("index");
            String url = WebUtils.uploadToHostingService("blueprint.txt", BlueprintStringData.encode(blueprint.json()).getBytes());
            links.add(new SimpleEntry<>(url, blueprint.getLabel().orElse(null)));
        } catch (Exception e) {
            event.getReporting().addException(e);
        }
    }
    List<EmbedBuilder> embedBuilders = new ArrayList<>();
    if (!links.isEmpty()) {
        ArrayDeque<String> lines = links.stream().map(p -> (p.getValue() != null && !p.getValue().isEmpty()) ? ("[" + p.getValue() + "](" + p.getKey() + ")") : p.getKey()).collect(Collectors.toCollection(ArrayDeque::new));
        while (!lines.isEmpty()) {
            EmbedBuilder builder = new EmbedBuilder();
            StringBuilder description = new StringBuilder();
            while (!lines.isEmpty()) {
                if (description.length() + lines.peek().length() + 1 < MessageEmbed.DESCRIPTION_MAX_LENGTH) {
                    description.append(lines.pop()).append('\n');
                } else {
                    break;
                }
            }
            builder.setDescription(description);
            embedBuilders.add(builder);
        }
    } else {
        embedBuilders.add(new EmbedBuilder().setDescription("Blueprint not found!"));
    }
    List<MessageEmbed> embeds = embedBuilders.stream().map(EmbedBuilder::build).collect(Collectors.toList());
    for (MessageEmbed embed : embeds) {
        event.replyEmbed(embed);
    }
}
Also used : OptionType(net.dv8tion.jda.api.interactions.commands.OptionType) Arrays(java.util.Arrays) EventReply(com.demod.dcba.EventReply) URL(java.net.URL) FBSR(com.demod.fbsr.FBSR) Permission(net.dv8tion.jda.api.Permission) SlashCommandHandler(com.demod.dcba.SlashCommandHandler) Field(net.dv8tion.jda.api.entities.MessageEmbed.Field) TextChannel(net.dv8tion.jda.api.entities.TextChannel) DataTable(com.demod.factorio.DataTable) RenderUtils(com.demod.fbsr.RenderUtils) JSONException(org.json.JSONException) Matcher(java.util.regex.Matcher) JSONObject(org.json.JSONObject) Map(java.util.Map) ZipEntry(java.util.zip.ZipEntry) WebUtils(com.demod.fbsr.WebUtils) Message(net.dv8tion.jda.api.entities.Message) BufferedImage(java.awt.image.BufferedImage) DataPrototype(com.demod.factorio.prototype.DataPrototype) LevenshteinDistance(org.apache.commons.text.similarity.LevenshteinDistance) Collectors(java.util.stream.Collectors) Config(com.demod.factorio.Config) BlueprintEntity(com.demod.fbsr.BlueprintEntity) List(java.util.List) FactorioData(com.demod.factorio.FactorioData) MessageCommandEvent(com.demod.dcba.MessageCommandEvent) Entry(java.util.Map.Entry) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) BlueprintStringData(com.demod.fbsr.BlueprintStringData) ZipOutputStream(java.util.zip.ZipOutputStream) Blueprint(com.demod.fbsr.Blueprint) ByteArrayOutputStream(java.io.ByteArrayOutputStream) HashMap(java.util.HashMap) Function(java.util.function.Function) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) WatchdogReporter(com.demod.fbsr.app.WatchdogService.WatchdogReporter) ImmutableList(com.google.common.collect.ImmutableList) AbstractIdleService(com.google.common.util.concurrent.AbstractIdleService) SlashCommandEvent(com.demod.dcba.SlashCommandEvent) SimpleEntry(java.util.AbstractMap.SimpleEntry) Attachment(net.dv8tion.jda.api.entities.Message.Attachment) MapVersion(com.demod.fbsr.MapVersion) OptionData(net.dv8tion.jda.api.interactions.commands.build.OptionData) CommandReporting(com.demod.dcba.CommandReporting) DCBA(com.demod.dcba.DCBA) IOException(java.io.IOException) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Utils(com.demod.factorio.Utils) DiscordBot(com.demod.dcba.DiscordBot) LuaValue(org.luaj.vm2.LuaValue) AutoCompleteHandler(com.demod.dcba.AutoCompleteHandler) MessageEmbed(net.dv8tion.jda.api.entities.MessageEmbed) ArrayDeque(java.util.ArrayDeque) BlueprintFinder(com.demod.fbsr.BlueprintFinder) ChunkingFilter(net.dv8tion.jda.api.utils.ChunkingFilter) JSONArray(org.json.JSONArray) MessageEmbed(net.dv8tion.jda.api.entities.MessageEmbed) Blueprint(com.demod.fbsr.Blueprint) ArrayList(java.util.ArrayList) Attachment(net.dv8tion.jda.api.entities.Message.Attachment) BlueprintStringData(com.demod.fbsr.BlueprintStringData) JSONException(org.json.JSONException) IOException(java.io.IOException) ZipEntry(java.util.zip.ZipEntry) Entry(java.util.Map.Entry) SimpleEntry(java.util.AbstractMap.SimpleEntry) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder)

Example 4 with SlashCommandEvent

use of com.demod.dcba.SlashCommandEvent in project Factorio-FBSR by demodude4u.

the class BlueprintBotDiscordService method handleBlueprintSlashCommand.

private void handleBlueprintSlashCommand(SlashCommandEvent event) throws IOException {
    String content = event.getCommandString();
    Optional<Attachment> attachment = event.optParamAttachment("file");
    if (attachment.isPresent()) {
        content += " " + attachment.get().getUrl();
    }
    JSONObject options = new JSONObject();
    findDebugOptions(event.getReporting(), content, options);
    event.optParamBoolean("simple").ifPresent(b -> options.put("show-info-panels", !b));
    event.optParamLong("max-width").ifPresent(l -> options.put("max-width", l.intValue()));
    event.optParamLong("max-height").ifPresent(l -> options.put("max-height", l.intValue()));
    List<BlueprintStringData> blueprintStringDatas = BlueprintFinder.search(content, event.getReporting());
    List<EmbedBuilder> embedBuilders = processBlueprints(blueprintStringDatas, event.getReporting(), options);
    if (blueprintStringDatas.stream().anyMatch(d -> d.getBlueprints().stream().anyMatch(b -> b.isModsDetected()))) {
        embedBuilders.get(embedBuilders.size() - 1).setFooter("(Modded features are shown as question marks)");
    }
    List<MessageEmbed> embeds = embedBuilders.stream().map(EmbedBuilder::build).collect(Collectors.toList());
    for (MessageEmbed embed : embeds) {
        event.replyEmbed(embed);
    }
}
Also used : OptionType(net.dv8tion.jda.api.interactions.commands.OptionType) Arrays(java.util.Arrays) EventReply(com.demod.dcba.EventReply) URL(java.net.URL) FBSR(com.demod.fbsr.FBSR) Permission(net.dv8tion.jda.api.Permission) SlashCommandHandler(com.demod.dcba.SlashCommandHandler) Field(net.dv8tion.jda.api.entities.MessageEmbed.Field) TextChannel(net.dv8tion.jda.api.entities.TextChannel) DataTable(com.demod.factorio.DataTable) RenderUtils(com.demod.fbsr.RenderUtils) JSONException(org.json.JSONException) Matcher(java.util.regex.Matcher) JSONObject(org.json.JSONObject) Map(java.util.Map) ZipEntry(java.util.zip.ZipEntry) WebUtils(com.demod.fbsr.WebUtils) Message(net.dv8tion.jda.api.entities.Message) BufferedImage(java.awt.image.BufferedImage) DataPrototype(com.demod.factorio.prototype.DataPrototype) LevenshteinDistance(org.apache.commons.text.similarity.LevenshteinDistance) Collectors(java.util.stream.Collectors) Config(com.demod.factorio.Config) BlueprintEntity(com.demod.fbsr.BlueprintEntity) List(java.util.List) FactorioData(com.demod.factorio.FactorioData) MessageCommandEvent(com.demod.dcba.MessageCommandEvent) Entry(java.util.Map.Entry) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) BlueprintStringData(com.demod.fbsr.BlueprintStringData) ZipOutputStream(java.util.zip.ZipOutputStream) Blueprint(com.demod.fbsr.Blueprint) ByteArrayOutputStream(java.io.ByteArrayOutputStream) HashMap(java.util.HashMap) Function(java.util.function.Function) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) WatchdogReporter(com.demod.fbsr.app.WatchdogService.WatchdogReporter) ImmutableList(com.google.common.collect.ImmutableList) AbstractIdleService(com.google.common.util.concurrent.AbstractIdleService) SlashCommandEvent(com.demod.dcba.SlashCommandEvent) SimpleEntry(java.util.AbstractMap.SimpleEntry) Attachment(net.dv8tion.jda.api.entities.Message.Attachment) MapVersion(com.demod.fbsr.MapVersion) OptionData(net.dv8tion.jda.api.interactions.commands.build.OptionData) CommandReporting(com.demod.dcba.CommandReporting) DCBA(com.demod.dcba.DCBA) IOException(java.io.IOException) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Utils(com.demod.factorio.Utils) DiscordBot(com.demod.dcba.DiscordBot) LuaValue(org.luaj.vm2.LuaValue) AutoCompleteHandler(com.demod.dcba.AutoCompleteHandler) MessageEmbed(net.dv8tion.jda.api.entities.MessageEmbed) ArrayDeque(java.util.ArrayDeque) BlueprintFinder(com.demod.fbsr.BlueprintFinder) ChunkingFilter(net.dv8tion.jda.api.utils.ChunkingFilter) JSONArray(org.json.JSONArray) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) MessageEmbed(net.dv8tion.jda.api.entities.MessageEmbed) JSONObject(org.json.JSONObject) Attachment(net.dv8tion.jda.api.entities.Message.Attachment) BlueprintStringData(com.demod.fbsr.BlueprintStringData)

Example 5 with SlashCommandEvent

use of com.demod.dcba.SlashCommandEvent in project Factorio-FBSR by demodude4u.

the class BlueprintBotDiscordService method handleBlueprintItemsRawCommand.

private void handleBlueprintItemsRawCommand(SlashCommandEvent event) throws IOException {
    DataTable table;
    try {
        table = FactorioData.getTable();
    } catch (JSONException | IOException e1) {
        throw new InternalError(e1);
    }
    String content = event.getCommandString();
    Optional<Attachment> attachment = event.optParamAttachment("file");
    if (attachment.isPresent()) {
        content += " " + attachment.get().getUrl();
    }
    List<BlueprintStringData> blueprintStringDatas = BlueprintFinder.search(content, event.getReporting());
    Map<String, Double> totalItems = new LinkedHashMap<>();
    for (BlueprintStringData blueprintStringData : blueprintStringDatas) {
        for (Blueprint blueprint : blueprintStringData.getBlueprints()) {
            Map<String, Double> items = FBSR.generateTotalItems(table, blueprint);
            items.forEach((k, v) -> {
                totalItems.compute(k, ($, old) -> old == null ? v : old + v);
            });
        }
    }
    Map<String, Double> rawItems = FBSR.generateTotalRawItems(table, table.getRecipes(), totalItems);
    if (!rawItems.isEmpty()) {
        String responseContent = rawItems.entrySet().stream().sorted((e1, e2) -> e1.getKey().compareTo(e2.getKey())).map(e -> table.getWikiItemName(e.getKey()) + ": " + RenderUtils.fmtDouble2(e.getValue())).collect(Collectors.joining("\n"));
        String response = "```ldif\n" + responseContent + "```";
        if (response.length() < 2000) {
            event.reply(response);
        } else {
            event.replyFile(responseContent.getBytes(), "raw-items.txt");
        }
    } else if (blueprintStringDatas.stream().anyMatch(d -> !d.getBlueprints().isEmpty())) {
        event.replyIfNoException("I couldn't find any items!");
    } else {
        event.replyIfNoException("No blueprint found!");
    }
}
Also used : OptionType(net.dv8tion.jda.api.interactions.commands.OptionType) Arrays(java.util.Arrays) EventReply(com.demod.dcba.EventReply) URL(java.net.URL) FBSR(com.demod.fbsr.FBSR) Permission(net.dv8tion.jda.api.Permission) SlashCommandHandler(com.demod.dcba.SlashCommandHandler) Field(net.dv8tion.jda.api.entities.MessageEmbed.Field) TextChannel(net.dv8tion.jda.api.entities.TextChannel) DataTable(com.demod.factorio.DataTable) RenderUtils(com.demod.fbsr.RenderUtils) JSONException(org.json.JSONException) Matcher(java.util.regex.Matcher) JSONObject(org.json.JSONObject) Map(java.util.Map) ZipEntry(java.util.zip.ZipEntry) WebUtils(com.demod.fbsr.WebUtils) Message(net.dv8tion.jda.api.entities.Message) BufferedImage(java.awt.image.BufferedImage) DataPrototype(com.demod.factorio.prototype.DataPrototype) LevenshteinDistance(org.apache.commons.text.similarity.LevenshteinDistance) Collectors(java.util.stream.Collectors) Config(com.demod.factorio.Config) BlueprintEntity(com.demod.fbsr.BlueprintEntity) List(java.util.List) FactorioData(com.demod.factorio.FactorioData) MessageCommandEvent(com.demod.dcba.MessageCommandEvent) Entry(java.util.Map.Entry) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) BlueprintStringData(com.demod.fbsr.BlueprintStringData) ZipOutputStream(java.util.zip.ZipOutputStream) Blueprint(com.demod.fbsr.Blueprint) ByteArrayOutputStream(java.io.ByteArrayOutputStream) HashMap(java.util.HashMap) Function(java.util.function.Function) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) WatchdogReporter(com.demod.fbsr.app.WatchdogService.WatchdogReporter) ImmutableList(com.google.common.collect.ImmutableList) AbstractIdleService(com.google.common.util.concurrent.AbstractIdleService) SlashCommandEvent(com.demod.dcba.SlashCommandEvent) SimpleEntry(java.util.AbstractMap.SimpleEntry) Attachment(net.dv8tion.jda.api.entities.Message.Attachment) MapVersion(com.demod.fbsr.MapVersion) OptionData(net.dv8tion.jda.api.interactions.commands.build.OptionData) CommandReporting(com.demod.dcba.CommandReporting) DCBA(com.demod.dcba.DCBA) IOException(java.io.IOException) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Utils(com.demod.factorio.Utils) DiscordBot(com.demod.dcba.DiscordBot) LuaValue(org.luaj.vm2.LuaValue) AutoCompleteHandler(com.demod.dcba.AutoCompleteHandler) MessageEmbed(net.dv8tion.jda.api.entities.MessageEmbed) ArrayDeque(java.util.ArrayDeque) BlueprintFinder(com.demod.fbsr.BlueprintFinder) ChunkingFilter(net.dv8tion.jda.api.utils.ChunkingFilter) JSONArray(org.json.JSONArray) DataTable(com.demod.factorio.DataTable) Blueprint(com.demod.fbsr.Blueprint) JSONException(org.json.JSONException) Attachment(net.dv8tion.jda.api.entities.Message.Attachment) BlueprintStringData(com.demod.fbsr.BlueprintStringData) IOException(java.io.IOException) LinkedHashMap(java.util.LinkedHashMap)

Aggregations

AutoCompleteHandler (com.demod.dcba.AutoCompleteHandler)7 CommandReporting (com.demod.dcba.CommandReporting)7 DCBA (com.demod.dcba.DCBA)7 DiscordBot (com.demod.dcba.DiscordBot)7 EventReply (com.demod.dcba.EventReply)7 MessageCommandEvent (com.demod.dcba.MessageCommandEvent)7 SlashCommandEvent (com.demod.dcba.SlashCommandEvent)7 SlashCommandHandler (com.demod.dcba.SlashCommandHandler)7 Config (com.demod.factorio.Config)7 DataTable (com.demod.factorio.DataTable)7 FactorioData (com.demod.factorio.FactorioData)7 Utils (com.demod.factorio.Utils)7 DataPrototype (com.demod.factorio.prototype.DataPrototype)7 Blueprint (com.demod.fbsr.Blueprint)7 BlueprintEntity (com.demod.fbsr.BlueprintEntity)7 BlueprintFinder (com.demod.fbsr.BlueprintFinder)7 BlueprintStringData (com.demod.fbsr.BlueprintStringData)7 FBSR (com.demod.fbsr.FBSR)7 MapVersion (com.demod.fbsr.MapVersion)7 RenderUtils (com.demod.fbsr.RenderUtils)7