Search in sources :

Example 11 with WarningMessage

use of io.github.spugn.Sargo.Objects.WarningMessage in project S-argo by Expugn.

the class StepUp method run.

@Override
protected void run() {
    switch(CHOICE.toLowerCase()) {
        case "s":
        case "si":
            if (userMemoryDiamonds < singleScoutPrice) {
                CHANNEL.sendMessage(new WarningMessage("NOT ENOUGH MEMORY DIAMONDS", "You need **" + singleScoutPrice + "** Memory Diamonds to scout.\nUse '" + CommandManager.getCommandPrefix() + "**shop**' to get more Memory Diamonds.").get().build());
                return;
            }
            if (CHOICE.equalsIgnoreCase("si") && !IMAGE_DISABLED) {
                generateImage = true;
            }
            userMemoryDiamonds -= singleScoutPrice;
            USER.setMemoryDiamonds(userMemoryDiamonds);
            doSinglePull();
            break;
        case "m":
        case "mi":
            if (userMemoryDiamonds < multiScoutPrice) {
                CHANNEL.sendMessage(new WarningMessage("NOT ENOUGH MEMORY DIAMONDS", "You need **" + multiScoutPrice + "** Memory Diamonds to scout.\nUse '" + CommandManager.getCommandPrefix() + "**shop**' to get more Memory Diamonds.").get().build());
                return;
            }
            if (CHOICE.equalsIgnoreCase("mi") && !IMAGE_DISABLED) {
                generateImage = true;
            }
            userMemoryDiamonds -= multiScoutPrice;
            USER.setMemoryDiamonds(userMemoryDiamonds);
            doMultiPull();
            updateBannerData();
            break;
        default:
            CHANNEL.sendMessage(new WarningMessage("UNKNOWN/UNAVAILABLE SCOUT TYPE", "Only `single` and `multi` scouts are available.").get().build());
            return;
    }
    if (stopScout)
        return;
    displayAndSave();
}
Also used : WarningMessage(io.github.spugn.Sargo.Objects.WarningMessage)

Example 12 with WarningMessage

use of io.github.spugn.Sargo.Objects.WarningMessage in project S-argo by Expugn.

the class StepUpv2 method run.

@Override
protected void run() {
    switch(CHOICE.toLowerCase()) {
        case "s":
        case "si":
            if (userMemoryDiamonds < singleScoutPrice) {
                CHANNEL.sendMessage(new WarningMessage("NOT ENOUGH MEMORY DIAMONDS", "You need **" + singleScoutPrice + "** Memory Diamonds to scout.\nUse '" + CommandManager.getCommandPrefix() + "**shop**' to get more Memory Diamonds.").get().build());
                return;
            }
            if (CHOICE.equalsIgnoreCase("si") && !IMAGE_DISABLED) {
                generateImage = true;
            }
            userMemoryDiamonds -= singleScoutPrice;
            USER.setMemoryDiamonds(userMemoryDiamonds);
            doSinglePull();
            break;
        case "m":
        case "mi":
            if (userMemoryDiamonds < multiScoutPrice) {
                CHANNEL.sendMessage(new WarningMessage("NOT ENOUGH MEMORY DIAMONDS", "You need **" + multiScoutPrice + "** Memory Diamonds to scout.\nUse '" + CommandManager.getCommandPrefix() + "**shop**' to get more Memory Diamonds.").get().build());
                return;
            }
            if (CHOICE.equalsIgnoreCase("mi") && !IMAGE_DISABLED) {
                generateImage = true;
            }
            userMemoryDiamonds -= multiScoutPrice;
            USER.setMemoryDiamonds(userMemoryDiamonds);
            doMultiPull();
            updateBannerData();
            break;
        default:
            CHANNEL.sendMessage(new WarningMessage("UNKNOWN/UNAVAILABLE SCOUT TYPE", "Only `single` and `multi` scouts are available.").get().build());
            return;
    }
    if (stopScout)
        return;
    displayAndSave();
}
Also used : WarningMessage(io.github.spugn.Sargo.Objects.WarningMessage)

Example 13 with WarningMessage

use of io.github.spugn.Sargo.Objects.WarningMessage in project S-argo by Expugn.

the class Normal method run.

@Override
protected void run() {
    switch(CHOICE.toLowerCase()) {
        case "ws":
        case "wsi":
            if (userMemoryDiamonds < singleScoutPrice) {
                CHANNEL.sendMessage(new WarningMessage("NOT ENOUGH MEMORY DIAMONDS", "You need **" + singleScoutPrice + "** Memory Diamonds to scout.\nUse '" + CommandManager.getCommandPrefix() + "**shop**' to get more Memory Diamonds.").get().build());
                return;
            }
            if (CHOICE.equalsIgnoreCase("wsi") && !IMAGE_DISABLED) {
                generateImage = true;
            }
            userMemoryDiamonds -= singleScoutPrice;
            USER.setMemoryDiamonds(userMemoryDiamonds);
            doSinglePull();
            break;
        case "wm":
        case "wmi":
            if (userMemoryDiamonds < multiScoutPrice) {
                CHANNEL.sendMessage(new WarningMessage("NOT ENOUGH MEMORY DIAMONDS", "You need **" + multiScoutPrice + "** Memory Diamonds to scout.\nUse '" + CommandManager.getCommandPrefix() + "**shop**' to get more Memory Diamonds.").get().build());
                return;
            }
            if (CHOICE.equalsIgnoreCase("wmi") && !IMAGE_DISABLED) {
                generateImage = true;
            }
            userMemoryDiamonds -= multiScoutPrice;
            USER.setMemoryDiamonds(userMemoryDiamonds);
            doMultiPull();
            break;
        default:
            CHANNEL.sendMessage(new WarningMessage("UNKNOWN/UNAVAILABLE SCOUT TYPE", "Use '" + CommandManager.getCommandPrefix() + "**scout** " + BANNER_ID + "' and read the footer text for available scout types.").get().build());
            return;
    }
    if (stopScout)
        return;
    displayAndSave();
}
Also used : WarningMessage(io.github.spugn.Sargo.Objects.WarningMessage)

Example 14 with WarningMessage

use of io.github.spugn.Sargo.Objects.WarningMessage in project S-argo by Expugn.

the class StepUp method run.

@Override
protected void run() {
    switch(CHOICE.toLowerCase()) {
        case "ws":
        case "wsi":
            if (userMemoryDiamonds < singleScoutPrice) {
                CHANNEL.sendMessage(new WarningMessage("NOT ENOUGH MEMORY DIAMONDS", "You need **" + singleScoutPrice + "** Memory Diamonds to scout.\nUse '" + CommandManager.getCommandPrefix() + "**shop**' to get more Memory Diamonds.").get().build());
                return;
            }
            if (CHOICE.equalsIgnoreCase("wsi") && !IMAGE_DISABLED) {
                generateImage = true;
            }
            userMemoryDiamonds -= singleScoutPrice;
            USER.setMemoryDiamonds(userMemoryDiamonds);
            doSinglePull();
            break;
        case "wm":
        case "wmi":
            if (userMemoryDiamonds < multiScoutPrice) {
                CHANNEL.sendMessage(new WarningMessage("NOT ENOUGH MEMORY DIAMONDS", "You need **" + multiScoutPrice + "** Memory Diamonds to scout.\nUse '" + CommandManager.getCommandPrefix() + "**shop**' to get more Memory Diamonds.").get().build());
                return;
            }
            if (CHOICE.equalsIgnoreCase("wmi") && !IMAGE_DISABLED) {
                generateImage = true;
            }
            userMemoryDiamonds -= multiScoutPrice;
            USER.setMemoryDiamonds(userMemoryDiamonds);
            doMultiPull();
            updateBannerData();
            break;
        default:
            CHANNEL.sendMessage(new WarningMessage("UNKNOWN/UNAVAILABLE SCOUT TYPE", "Use '" + CommandManager.getCommandPrefix() + "**scout** " + BANNER_ID + "' and read the footer text for available scout types.").get().build());
            return;
    }
    if (stopScout)
        return;
    displayAndSave();
}
Also used : WarningMessage(io.github.spugn.Sargo.Objects.WarningMessage)

Example 15 with WarningMessage

use of io.github.spugn.Sargo.Objects.WarningMessage in project S-argo by Expugn.

the class CommandManager method reloadCommand.

private void reloadCommand() {
    Reload.reloadBanners();
    Reload.reloadSettings();
    CHANNEL.sendMessage(new WarningMessage("FILES RELOADED", "The Banners.xml and Settings.xml file have been reloaded.").get().build());
}
Also used : WarningMessage(io.github.spugn.Sargo.Objects.WarningMessage)

Aggregations

WarningMessage (io.github.spugn.Sargo.Objects.WarningMessage)19 GitHubImage (io.github.spugn.Sargo.Utilities.GitHubImage)1 File (java.io.File)1 FileNotFoundException (java.io.FileNotFoundException)1 IMessage (sx.blah.discord.handle.obj.IMessage)1 EmbedBuilder (sx.blah.discord.util.EmbedBuilder)1 RateLimitException (sx.blah.discord.util.RateLimitException)1