// Path: app/src/main/java/ultimategdbot/Strings.java
// public final class Strings {
// 
//     public static final String GENERAL = "GeneralStrings";
//     public static final String GD = "GDStrings";
// 
//     private Strings() {
//         throw new AssertionError();
//     }
// }
// 
// Path: app/src/main/java/ultimategdbot/util/SystemUnit.java
// public enum SystemUnit {
//     BYTE,
//     KILOBYTE,
//     MEGABYTE,
//     GIGABYTE,
//     TERABYTE;
// 
//     /**
//      * Formats the given value to a human readable format, using the appropriate unit
//      *
//      * @param byteValue the value to format
//      * @return String
//      */
//     public static String format(long byteValue) {
//         SystemUnit unit = BYTE;
//         double convertedValue = byteValue;
// 
//         while (unit.ordinal() < values().length && (convertedValue = unit.convert(byteValue)) >= 1024)
//             unit = values()[unit.ordinal() + 1];
// 
//         convertedValue = Math.round(convertedValue * 100) / 100.0;
// 
//         return String.format("%.2f %s", convertedValue, unit.toString());
//     }
// 
//     /**
//      * Converts the given value to the unit represented by the current object
//      *
//      * @param byteValue the value to convert
//      * @return double
//      */
//     public double convert(long byteValue) {
//         return byteValue / Math.pow(2, this.ordinal() * 10);
//     }
// 
//     @Override
//     public String toString() {
//         return super.toString().charAt(0) + (this.ordinal() > 0 ? "B" : "");
//     }
// }


import botrino.api.i18n.Translator;
import botrino.api.util.DurationUtils;
import botrino.interaction.annotation.ChatInputCommand;
import botrino.interaction.context.ChatInputInteractionContext;
import botrino.interaction.listener.ChatInputInteractionListener;
import com.sun.management.GarbageCollectionNotificationInfo;
import discord4j.core.spec.EmbedCreateSpec;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.publisher.Sinks;
import ultimategdbot.Strings;
import ultimategdbot.util.SystemUnit;
import javax.management.NotificationEmitter;
import javax.management.NotificationListener;
import javax.management.openmbean.CompositeData;
import java.lang.management.ManagementFactory;
import java.time.Duration;
import java.time.Instant;
import java.util.Optional;
import java.util.function.Function;
package ultimategdbot.command;



@ChatInputCommand(name = "runtime", description = "Display runtime information on the bot.")
public final class RuntimeCommand implements ChatInputInteractionListener {

    public RuntimeCommand() {
        MemoryStats.start();
    }

    private static Mono<EmbedField> uptime(Translator tr) {
// Path: app/src/main/java/ultimategdbot/Strings.java
// public final class Strings {
// 
//     public static final String GENERAL = "GeneralStrings";
//     public static final String GD = "GDStrings";
// 
//     private Strings() {
//         throw new AssertionError();
//     }
// }
// 
// Path: app/src/main/java/ultimategdbot/util/SystemUnit.java
// public enum SystemUnit {
//     BYTE,
//     KILOBYTE,
//     MEGABYTE,
//     GIGABYTE,
//     TERABYTE;
// 
//     /**
//      * Formats the given value to a human readable format, using the appropriate unit
//      *
//      * @param byteValue the value to format
//      * @return String
//      */
//     public static String format(long byteValue) {
//         SystemUnit unit = BYTE;
//         double convertedValue = byteValue;
// 
//         while (unit.ordinal() < values().length && (convertedValue = unit.convert(byteValue)) >= 1024)
//             unit = values()[unit.ordinal() + 1];
// 
//         convertedValue = Math.round(convertedValue * 100) / 100.0;
// 
//         return String.format("%.2f %s", convertedValue, unit.toString());
//     }
// 
//     /**
//      * Converts the given value to the unit represented by the current object
//      *
//      * @param byteValue the value to convert
//      * @return double
//      */
//     public double convert(long byteValue) {
//         return byteValue / Math.pow(2, this.ordinal() * 10);
//     }
// 
//     @Override
//     public String toString() {
//         return super.toString().charAt(0) + (this.ordinal() > 0 ? "B" : "");
//     }
// }


// Path: app/src/main/java/ultimategdbot/command/RuntimeCommand.java
import botrino.api.i18n.Translator;
import botrino.api.util.DurationUtils;
import botrino.interaction.annotation.ChatInputCommand;
import botrino.interaction.context.ChatInputInteractionContext;
import botrino.interaction.listener.ChatInputInteractionListener;
import com.sun.management.GarbageCollectionNotificationInfo;
import discord4j.core.spec.EmbedCreateSpec;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.publisher.Sinks;
import ultimategdbot.Strings;
import ultimategdbot.util.SystemUnit;
import javax.management.NotificationEmitter;
import javax.management.NotificationListener;
import javax.management.openmbean.CompositeData;
import java.lang.management.ManagementFactory;
import java.time.Duration;
import java.time.Instant;
import java.util.Optional;
import java.util.function.Function;

package ultimategdbot.command;



@ChatInputCommand(name = "runtime", description = "Display runtime information on the bot.")
public final class RuntimeCommand implements ChatInputInteractionListener {

    public RuntimeCommand() {
        MemoryStats.start();
    }

    private static Mono<EmbedField> uptime(Translator tr) {
        return Mono.just(new EmbedField(tr.translate(Strings.GENERAL, "uptime"),