Search in sources :

Example 1 with Item

use of net.kodehawa.mantarobot.commands.currency.item.Item in project MantaroBot by Mantaro.

the class CurrencyCmds method transferItems.

@Subscribe
public void transferItems(CommandRegistry cr) {
    cr.register("itemtransfer", new SimpleCommand(Category.CURRENCY) {

        RateLimiter rl = new RateLimiter(TimeUnit.SECONDS, 10);

        @Override
        protected void call(GuildMessageReceivedEvent event, String content, String[] args) {
            if (args.length < 2) {
                onError(event);
                return;
            }
            List<User> mentionedUsers = event.getMessage().getMentionedUsers();
            if (mentionedUsers.size() == 0) {
                event.getChannel().sendMessage(EmoteReference.ERROR + "You need to mention a user").queue();
            } else {
                User giveTo = mentionedUsers.get(0);
                if (event.getAuthor().getId().equals(giveTo.getId())) {
                    event.getChannel().sendMessage(EmoteReference.ERROR + "You cannot transfer items to yourself!").queue();
                    return;
                }
                if (giveTo.isBot()) {
                    event.getChannel().sendMessage(EmoteReference.ERROR + "You cannot transfer items to a bot.").queue();
                    return;
                }
                if (!handleDefaultRatelimit(rl, event.getAuthor(), event))
                    return;
                Item item = Items.fromAny(args[1]).orElse(null);
                if (item == null) {
                    event.getChannel().sendMessage("There isn't an item associated with this emoji.").queue();
                } else {
                    Player player = MantaroData.db().getPlayer(event.getAuthor());
                    Player giveToPlayer = MantaroData.db().getPlayer(giveTo);
                    if (player.isLocked()) {
                        event.getChannel().sendMessage(EmoteReference.ERROR + "You cannot transfer items now.").queue();
                        return;
                    }
                    if (args.length == 2) {
                        if (player.getInventory().containsItem(item)) {
                            if (item.isHidden()) {
                                event.getChannel().sendMessage(EmoteReference.ERROR + "You cannot transfer this item!").queue();
                                return;
                            }
                            if (giveToPlayer.getInventory().asMap().getOrDefault(item, new ItemStack(item, 0)).getAmount() >= 5000) {
                                event.getChannel().sendMessage(EmoteReference.ERROR + "This player has the maximum possible amount of this item (5000).").queue();
                                return;
                            }
                            player.getInventory().process(new ItemStack(item, -1));
                            giveToPlayer.getInventory().process(new ItemStack(item, 1));
                            event.getChannel().sendMessage(String.format("%s%s gave 1 **%s** to %s", EmoteReference.OK, event.getMember().getEffectiveName(), item.getName(), event.getGuild().getMember(giveTo).getEffectiveName())).queue();
                        } else {
                            event.getChannel().sendMessage(EmoteReference.ERROR + "You don't have any of these items in your inventory").queue();
                        }
                        player.saveAsync();
                        giveToPlayer.saveAsync();
                        return;
                    }
                    try {
                        int amount = Math.abs(Integer.parseInt(args[2]));
                        if (player.getInventory().containsItem(item) && player.getInventory().getAmount(item) >= amount) {
                            if (item.isHidden()) {
                                event.getChannel().sendMessage(EmoteReference.ERROR + "You cannot transfer this item!").queue();
                                return;
                            }
                            if (giveToPlayer.getInventory().asMap().getOrDefault(item, new ItemStack(item, 0)).getAmount() + amount > 5000) {
                                event.getChannel().sendMessage(EmoteReference.ERROR + "This player would exceed the maximum possible amount of this item (5000).").queue();
                                return;
                            }
                            player.getInventory().process(new ItemStack(item, amount * -1));
                            giveToPlayer.getInventory().process(new ItemStack(item, amount));
                            event.getChannel().sendMessage(String.format("%s%s gave %d **%s** to %s", EmoteReference.OK, event.getMember().getEffectiveName(), amount, item.getName(), event.getGuild().getMember(giveTo).getEffectiveName())).queue();
                        } else {
                            event.getChannel().sendMessage(EmoteReference.ERROR + "You don't have enough of this item to do that").queue();
                        }
                    } catch (NumberFormatException nfe) {
                        event.getChannel().sendMessage(EmoteReference.ERROR + "Invalid number provided").queue();
                    }
                    player.saveAsync();
                    giveToPlayer.saveAsync();
                }
            }
        }

        @Override
        public MessageEmbed help(GuildMessageReceivedEvent event) {
            return helpEmbed(event, "Transfer Items command").setDescription("**Transfers items from you to another player.**").addField("Usage", "`~>itemtransfer <@user> <item emoji or part of the name> <amount (optional)>` - **Transfers the item to player x**", false).addField("Parameters", "`@user` - user to send the item to\n" + "`item emoji` - write out the emoji of the item you want to send, or you can just use part of its name.\n" + "`amount` - optional, send a specific amount of an item to someone.", false).addField("Important", "You cannot send more items than what you already have", false).build();
        }
    });
    cr.registerAlias("itemtransfer", "transferitems");
}
Also used : Player(net.kodehawa.mantarobot.db.entities.Player) User(net.dv8tion.jda.core.entities.User) MessageEmbed(net.dv8tion.jda.core.entities.MessageEmbed) RateLimiter(net.kodehawa.mantarobot.utils.commands.RateLimiter) Item(net.kodehawa.mantarobot.commands.currency.item.Item) SimpleCommand(net.kodehawa.mantarobot.core.modules.commands.SimpleCommand) List(java.util.List) ItemStack(net.kodehawa.mantarobot.commands.currency.item.ItemStack) GuildMessageReceivedEvent(net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent) Subscribe(com.google.common.eventbus.Subscribe)

Example 2 with Item

use of net.kodehawa.mantarobot.commands.currency.item.Item in project MantaroBot by Mantaro.

the class CurrencyCmds method inventory.

@Subscribe
public void inventory(CommandRegistry cr) {
    cr.register("inventory", new SimpleCommand(Category.CURRENCY) {

        @Override
        public void call(GuildMessageReceivedEvent event, String content, String[] args) {
            Map<String, Optional<String>> t = StringUtils.parse(args);
            content = Utils.replaceArguments(t, content, "brief", "calculate");
            Member member = Utils.findMember(event, event.getMember(), content);
            if (member == null)
                return;
            Player player = MantaroData.db().getPlayer(member);
            if (t.containsKey("brief")) {
                event.getChannel().sendMessage(String.format("**%s's inventory:** %s", member.getEffectiveName(), ItemStack.toString(player.getInventory().asList()))).queue();
                return;
            }
            if (t.containsKey("calculate")) {
                long all = player.getInventory().asList().stream().filter(item -> item.getItem().isSellable()).mapToLong(value -> (long) (value.getItem().getValue() * value.getAmount() * 0.9d)).sum();
                event.getChannel().sendMessage(String.format("%sYou will get **%d credits** if you sell all of your items!", EmoteReference.DIAMOND, all)).queue();
                return;
            }
            EmbedBuilder builder = baseEmbed(event, member.getEffectiveName() + "'s Inventory", member.getUser().getEffectiveAvatarUrl());
            List<ItemStack> list = player.getInventory().asList();
            List<MessageEmbed.Field> fields = new LinkedList<>();
            if (list.isEmpty())
                builder.setDescription("There is only dust here.");
            else
                player.getInventory().asList().forEach(stack -> {
                    long buyValue = stack.getItem().isBuyable() ? stack.getItem().getValue() : 0;
                    long sellValue = stack.getItem().isSellable() ? (long) (stack.getItem().getValue() * 0.9) : 0;
                    fields.add(new MessageEmbed.Field(stack.getItem().getEmoji() + " " + stack.getItem().getName() + " x " + stack.getAmount(), String.format("**Price**: \uD83D\uDCE5 %d \uD83D\uDCE4 %d\n%s", buyValue, sellValue, stack.getItem().getDesc()), false));
                });
            List<List<MessageEmbed.Field>> splitFields = DiscordUtils.divideFields(18, fields);
            boolean hasReactionPerms = event.getGuild().getSelfMember().hasPermission(event.getChannel(), Permission.MESSAGE_ADD_REACTION);
            if (hasReactionPerms) {
                DiscordUtils.list(event, 45, false, builder, splitFields);
            } else {
                DiscordUtils.listText(event, 45, false, builder, splitFields);
            }
        }

        @Override
        public MessageEmbed help(GuildMessageReceivedEvent event) {
            return helpEmbed(event, "Inventory command").setDescription("**Shows your current inventory.**\n" + "You can use `~>inventory -brief` to get a mobile friendly version.\n" + "Use `~>inventory -calculate` to see how much you'd get if you sell every sellable item on your inventory!").build();
        }
    });
    cr.registerAlias("inventory", "inv");
}
Also used : Items(net.kodehawa.mantarobot.commands.currency.item.Items) Badge(net.kodehawa.mantarobot.commands.currency.profile.Badge) Module(net.kodehawa.mantarobot.core.modules.Module) java.util(java.util) Command(net.kodehawa.mantarobot.core.modules.commands.base.Command) Member(net.dv8tion.jda.core.entities.Member) Utils(net.kodehawa.mantarobot.utils.Utils) RateLimiter(net.kodehawa.mantarobot.utils.commands.RateLimiter) DiscordUtils(net.kodehawa.mantarobot.utils.DiscordUtils) RethinkDB.r(com.rethinkdb.RethinkDB.r) GuildMessageReceivedEvent(net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent) Cursor(com.rethinkdb.net.Cursor) Permission(net.dv8tion.jda.core.Permission) CommandRegistry(net.kodehawa.mantarobot.core.CommandRegistry) Utils.handleDefaultRatelimit(net.kodehawa.mantarobot.utils.Utils.handleDefaultRatelimit) OptArgs(com.rethinkdb.model.OptArgs) Inventory(net.kodehawa.mantarobot.db.entities.helpers.Inventory) StringUtils(br.com.brjdevs.java.utils.texts.StringUtils) Subscribe(com.google.common.eventbus.Subscribe) SimpleCommand(net.kodehawa.mantarobot.core.modules.commands.SimpleCommand) MessageEmbed(net.dv8tion.jda.core.entities.MessageEmbed) ItemStack(net.kodehawa.mantarobot.commands.currency.item.ItemStack) Connection(com.rethinkdb.net.Connection) Player(net.kodehawa.mantarobot.db.entities.Player) SubCommand(net.kodehawa.mantarobot.core.modules.commands.SubCommand) Category(net.kodehawa.mantarobot.core.modules.commands.base.Category) Collectors(java.util.stream.Collectors) EmbedBuilder(net.dv8tion.jda.core.EmbedBuilder) TreeCommand(net.kodehawa.mantarobot.core.modules.commands.TreeCommand) java.awt(java.awt) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) Stream(java.util.stream.Stream) User(net.dv8tion.jda.core.entities.User) EmoteReference(net.kodehawa.mantarobot.utils.commands.EmoteReference) MantaroData(net.kodehawa.mantarobot.data.MantaroData) Item(net.kodehawa.mantarobot.commands.currency.item.Item) Player(net.kodehawa.mantarobot.db.entities.Player) MessageEmbed(net.dv8tion.jda.core.entities.MessageEmbed) EmbedBuilder(net.dv8tion.jda.core.EmbedBuilder) SimpleCommand(net.kodehawa.mantarobot.core.modules.commands.SimpleCommand) List(java.util.List) Member(net.dv8tion.jda.core.entities.Member) GuildMessageReceivedEvent(net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent) Subscribe(com.google.common.eventbus.Subscribe)

Example 3 with Item

use of net.kodehawa.mantarobot.commands.currency.item.Item in project MantaroBot by Mantaro.

the class CurrencyCmds method openLootBox.

private void openLootBox(GuildMessageReceivedEvent event, boolean special) {
    List<Item> toAdd = new ArrayList<>();
    int amtItems = random.nextInt(3) + 3;
    List<Item> items = new ArrayList<>();
    items.addAll(Arrays.asList(Items.ALL));
    items.removeIf(item -> item.isHidden() || !item.isBuyable() || !item.isSellable());
    items.sort((o1, o2) -> {
        if (o1.getValue() > o2.getValue())
            return 1;
        if (o1.getValue() == o2.getValue())
            return 0;
        return -1;
    });
    if (!special) {
        for (Item i : Items.ALL) if (i.isHidden() || !i.isBuyable() || i.isSellable())
            items.add(i);
    }
    for (int i = 0; i < amtItems; i++) toAdd.add(selectReverseWeighted(items));
    Player player = MantaroData.db().getPlayer(event.getMember());
    ArrayList<ItemStack> ita = new ArrayList<>();
    toAdd.forEach(item -> ita.add(new ItemStack(item, 1)));
    boolean overflow = player.getInventory().merge(ita);
    player.saveAsync();
    event.getChannel().sendMessage(String.format("%s**You won:** %s%s", EmoteReference.LOOT_CRATE.getDiscordNotation(), toAdd.stream().map(Item::toString).collect(Collectors.joining(", ")), overflow ? ". But you already had too much, so you decided to throw away the excess" : "")).queue();
}
Also used : Item(net.kodehawa.mantarobot.commands.currency.item.Item) Player(net.kodehawa.mantarobot.db.entities.Player) ItemStack(net.kodehawa.mantarobot.commands.currency.item.ItemStack)

Example 4 with Item

use of net.kodehawa.mantarobot.commands.currency.item.Item in project MantaroBot by Mantaro.

the class CurrencyCmds method market.

@Subscribe
public void market(CommandRegistry cr) {
    final RateLimiter rateLimiter = new RateLimiter(TimeUnit.SECONDS, 8);
    TreeCommand marketCommand = (TreeCommand) cr.register("market", new TreeCommand(Category.CURRENCY) {

        @Override
        public Command defaultTrigger(GuildMessageReceivedEvent event, String mainCommand, String commandName) {
            return new SubCommand() {

                @Override
                protected void call(GuildMessageReceivedEvent event, String content) {
                    EmbedBuilder embed = baseEmbed(event, "Mantaro's Market").setThumbnail("https://png.icons8.com/metro/540/shopping-cart.png");
                    List<MessageEmbed.Field> fields = new LinkedList<>();
                    Stream.of(Items.ALL).forEach(item -> {
                        if (!item.isHidden()) {
                            String buyValue = item.isBuyable() ? String.format("$%d", item.getValue()) : "N/A";
                            String sellValue = item.isSellable() ? String.format("$%d", (int) Math.floor(item.getValue() * 0.9)) : "N/A";
                            fields.add(new MessageEmbed.Field(String.format("%s %s", item.getEmoji(), item.getName()), EmoteReference.BUY + buyValue + " " + EmoteReference.SELL + sellValue, true));
                        }
                    });
                    List<List<MessageEmbed.Field>> splitFields = DiscordUtils.divideFields(8, fields);
                    boolean hasReactionPerms = event.getGuild().getSelfMember().hasPermission(event.getChannel(), Permission.MESSAGE_ADD_REACTION);
                    if (hasReactionPerms) {
                        DiscordUtils.list(event, 120, false, embed, splitFields);
                    } else {
                        DiscordUtils.listText(event, 120, false, embed, splitFields);
                    }
                }
            };
        }

        @Override
        public MessageEmbed help(GuildMessageReceivedEvent event) {
            return helpEmbed(event, "Mantaro's market").setDescription("**List current items for buying and selling.**").addField("Buying and selling", "To buy do ~>market buy <item emoji>. It will subtract the value from your money" + " and give you the item.\n" + "To sell do `~>market sell all` to sell all your items or `~>market sell <item emoji>` to sell the specified item. " + "**You'll get the sell value of the item on coins to spend.**\n" + "You can check the value of a single item using `~>market price <item emoji>`\n" + "You can send an item to the trash using `~>market dump <amount> <item emoji>`\n" + "Use `~>inventory -calculate` to check how much is your inventory worth.", false).addField("To know", "If you don't have enough money you cannot buy the items.\n" + "Note: Don't use the item id, it's just for aesthetic reasons, the internal IDs are different than the ones shown here!", false).addField("Information", "To buy and sell multiple items you need to do `~>market <buy/sell> <amount> <item>`", false).build();
        }
    });
    marketCommand.setPredicate((event) -> {
        if (!handleDefaultRatelimit(rateLimiter, event.getAuthor(), event))
            return false;
        Player player = MantaroData.db().getPlayer(event.getMember());
        if (player.isLocked()) {
            event.getChannel().sendMessage(EmoteReference.ERROR + "You cannot access the market now.").queue();
            return false;
        }
        return true;
    });
    marketCommand.addSubCommand("dump", new SubCommand() {

        @Override
        protected void call(GuildMessageReceivedEvent event, String content) {
            String[] args = content.split(" ");
            String itemName = content;
            int itemNumber = 1;
            boolean isMassive = !itemName.isEmpty() && itemName.split(" ")[0].matches("^[0-9]*$");
            if (isMassive) {
                try {
                    itemNumber = Math.abs(Integer.valueOf(itemName.split(" ")[0]));
                    itemName = itemName.replace(args[0], "").trim();
                } catch (NumberFormatException e) {
                    event.getChannel().sendMessage(EmoteReference.ERROR + "Not a valid number of items to dump.").queue();
                    return;
                } catch (Exception e) {
                    onHelp(event);
                    return;
                }
            }
            Item item = Items.fromAny(itemName).orElse(null);
            if (item == null) {
                event.getChannel().sendMessage(EmoteReference.ERROR + "Cannot check the dump a non-existent item!").queue();
                return;
            }
            Player player = MantaroData.db().getPlayer(event.getAuthor());
            if (!player.getInventory().containsItem(item)) {
                event.getChannel().sendMessage(EmoteReference.ERROR + "Cannot dump an item you don't have!").queue();
                return;
            }
            if (player.getInventory().getAmount(item) < itemNumber) {
                event.getChannel().sendMessage(EmoteReference.ERROR + "You cannot dump more items than what you have.").queue();
                return;
            }
            player.getInventory().process(new ItemStack(item, -itemNumber));
            player.saveAsync();
            event.getChannel().sendMessage(String.format("%sSent %dx **%s %s** to the trash!", EmoteReference.CORRECT, itemNumber, item.getEmoji(), item.getName())).queue();
        }
    }).createSubCommandAlias("dump", "trash");
    marketCommand.addSubCommand("price", new SubCommand() {

        @Override
        protected void call(GuildMessageReceivedEvent event, String content) {
            String[] args = content.split(" ");
            String itemName = content.replace(args[0] + " ", "");
            Item item = Items.fromAny(itemName).orElse(null);
            if (item == null) {
                event.getChannel().sendMessage(EmoteReference.ERROR + "Cannot check the price of a non-existent item!").queue();
                return;
            }
            if (!item.isBuyable() && !item.isSellable()) {
                event.getChannel().sendMessage(EmoteReference.THINKING + "This item is not available neither for sell or buy (could be an exclusive collectible)").queue();
                return;
            }
            if (!item.isBuyable()) {
                event.getChannel().sendMessage(EmoteReference.EYES + "This is a collectible item. (Sell value: " + ((int) (item.getValue() * 0.9)) + " credits)").queue();
                return;
            }
            event.getChannel().sendMessage(String.format("%sThe market value of %s**%s** is %s credits to buy it and you can get %s credits if you sell it.", EmoteReference.MARKET, item.getEmoji(), item.getName(), item.getValue(), (int) (item.getValue() * 0.9))).queue();
        }
    });
    marketCommand.addSubCommand("sell", new SubCommand() {

        @Override
        protected void call(GuildMessageReceivedEvent event, String content) {
            Player player = MantaroData.db().getPlayer(event.getMember());
            String[] args = content.split(" ");
            String itemName = content;
            int itemNumber = 1;
            boolean isMassive = !itemName.isEmpty() && itemName.split(" ")[0].matches("^[0-9]*$");
            if (isMassive) {
                try {
                    itemNumber = Math.abs(Integer.valueOf(itemName.split(" ")[0]));
                    itemName = itemName.replace(args[0], "").trim();
                } catch (NumberFormatException e) {
                    event.getChannel().sendMessage(EmoteReference.ERROR + "Not a valid number of items to buy.").queue();
                    return;
                } catch (Exception e) {
                    onHelp(event);
                    return;
                }
            }
            try {
                if (args[0].equals("all")) {
                    long all = player.getInventory().asList().stream().filter(item -> item.getItem().isSellable()).mapToLong(value -> (long) (value.getItem().getValue() * value.getAmount() * 0.9d)).sum();
                    player.getInventory().clearOnlySellables();
                    player.addMoney(all);
                    event.getChannel().sendMessage(String.format("%sYou sold all your inventory items and gained %d credits!", EmoteReference.MONEY, all)).queue();
                    player.saveAsync();
                    return;
                }
                Item toSell = Items.fromAny(itemName).orElse(null);
                if (toSell == null) {
                    event.getChannel().sendMessage(EmoteReference.ERROR + "You cannot sell a non-existant item.").queue();
                    return;
                }
                if (!toSell.isSellable()) {
                    event.getChannel().sendMessage(EmoteReference.ERROR + "You cannot sell an item that cannot be sold.").queue();
                    return;
                }
                if (player.getInventory().getAmount(toSell) < 1) {
                    event.getChannel().sendMessage(EmoteReference.STOP + "You cannot sell an item you don't have.").queue();
                    return;
                }
                if (player.getInventory().getAmount(toSell) < itemNumber) {
                    event.getChannel().sendMessage(EmoteReference.ERROR + "You cannot sell more items than what you have.").queue();
                    return;
                }
                int many = itemNumber * -1;
                long amount = Math.round((toSell.getValue() * 0.9)) * Math.abs(many);
                player.getInventory().process(new ItemStack(toSell, many));
                player.addMoney(amount);
                player.getData().setMarketUsed(player.getData().getMarketUsed() + 1);
                event.getChannel().sendMessage(String.format("%sYou sold %d **%s** and gained %d credits!", EmoteReference.CORRECT, Math.abs(many), toSell.getName(), amount)).queue();
                player.saveAsync();
            } catch (Exception e) {
                event.getChannel().sendMessage(EmoteReference.ERROR + "Invalid syntax.").queue();
            }
        }
    });
    marketCommand.addSubCommand("buy", new SubCommand() {

        @Override
        protected void call(GuildMessageReceivedEvent event, String content) {
            Player player = MantaroData.db().getPlayer(event.getMember());
            String[] args = content.split(" ");
            String itemName = content;
            int itemNumber = 1;
            boolean isMassive = !itemName.isEmpty() && itemName.split(" ")[0].matches("^[0-9]*$");
            if (isMassive) {
                try {
                    itemNumber = Math.abs(Integer.valueOf(itemName.split(" ")[0]));
                    itemName = itemName.replace(args[0], "").trim();
                } catch (Exception e) {
                    if (e instanceof NumberFormatException) {
                        event.getChannel().sendMessage(EmoteReference.ERROR + "Not a valid number of items to buy.").queue();
                    } else {
                        onHelp(event);
                        return;
                    }
                }
            }
            Item itemToBuy = Items.fromAnyNoId(itemName).orElse(null);
            if (itemToBuy == null) {
                event.getChannel().sendMessage(EmoteReference.ERROR + "You cannot buy an unexistant item.").queue();
                return;
            }
            try {
                if (!itemToBuy.isBuyable()) {
                    event.getChannel().sendMessage(EmoteReference.ERROR + "You cannot buy an item that cannot be bought.").queue();
                    return;
                }
                ItemStack stack = player.getInventory().getStackOf(itemToBuy);
                if (stack != null && !stack.canJoin(new ItemStack(itemToBuy, itemNumber))) {
                    // assume overflow
                    event.getChannel().sendMessage(EmoteReference.ERROR + "You cannot buy more of that object!").queue();
                    return;
                }
                if (player.removeMoney(itemToBuy.getValue() * itemNumber)) {
                    player.getInventory().process(new ItemStack(itemToBuy, itemNumber));
                    player.getData().addBadgeIfAbsent(Badge.BUYER);
                    player.getData().setMarketUsed(player.getData().getMarketUsed() + 1);
                    player.saveAsync();
                    event.getChannel().sendMessage(String.format("%sBought %d %s for %d credits successfully. You now have %d credits.", EmoteReference.OK, itemNumber, itemToBuy.getEmoji(), itemToBuy.getValue() * itemNumber, player.getMoney())).queue();
                } else {
                    event.getChannel().sendMessage(EmoteReference.STOP + "You don't have enough money to buy this item.").queue();
                }
            } catch (Exception e) {
                event.getChannel().sendMessage(EmoteReference.ERROR + "Invalid syntax.").queue();
            }
        }
    });
}
Also used : Items(net.kodehawa.mantarobot.commands.currency.item.Items) Badge(net.kodehawa.mantarobot.commands.currency.profile.Badge) Module(net.kodehawa.mantarobot.core.modules.Module) java.util(java.util) Command(net.kodehawa.mantarobot.core.modules.commands.base.Command) Member(net.dv8tion.jda.core.entities.Member) Utils(net.kodehawa.mantarobot.utils.Utils) RateLimiter(net.kodehawa.mantarobot.utils.commands.RateLimiter) DiscordUtils(net.kodehawa.mantarobot.utils.DiscordUtils) RethinkDB.r(com.rethinkdb.RethinkDB.r) GuildMessageReceivedEvent(net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent) Cursor(com.rethinkdb.net.Cursor) Permission(net.dv8tion.jda.core.Permission) CommandRegistry(net.kodehawa.mantarobot.core.CommandRegistry) Utils.handleDefaultRatelimit(net.kodehawa.mantarobot.utils.Utils.handleDefaultRatelimit) OptArgs(com.rethinkdb.model.OptArgs) Inventory(net.kodehawa.mantarobot.db.entities.helpers.Inventory) StringUtils(br.com.brjdevs.java.utils.texts.StringUtils) Subscribe(com.google.common.eventbus.Subscribe) SimpleCommand(net.kodehawa.mantarobot.core.modules.commands.SimpleCommand) MessageEmbed(net.dv8tion.jda.core.entities.MessageEmbed) ItemStack(net.kodehawa.mantarobot.commands.currency.item.ItemStack) Connection(com.rethinkdb.net.Connection) Player(net.kodehawa.mantarobot.db.entities.Player) SubCommand(net.kodehawa.mantarobot.core.modules.commands.SubCommand) Category(net.kodehawa.mantarobot.core.modules.commands.base.Category) Collectors(java.util.stream.Collectors) EmbedBuilder(net.dv8tion.jda.core.EmbedBuilder) TreeCommand(net.kodehawa.mantarobot.core.modules.commands.TreeCommand) java.awt(java.awt) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) Stream(java.util.stream.Stream) User(net.dv8tion.jda.core.entities.User) EmoteReference(net.kodehawa.mantarobot.utils.commands.EmoteReference) MantaroData(net.kodehawa.mantarobot.data.MantaroData) Item(net.kodehawa.mantarobot.commands.currency.item.Item) Player(net.kodehawa.mantarobot.db.entities.Player) SubCommand(net.kodehawa.mantarobot.core.modules.commands.SubCommand) MessageEmbed(net.dv8tion.jda.core.entities.MessageEmbed) RateLimiter(net.kodehawa.mantarobot.utils.commands.RateLimiter) Item(net.kodehawa.mantarobot.commands.currency.item.Item) EmbedBuilder(net.dv8tion.jda.core.EmbedBuilder) List(java.util.List) ItemStack(net.kodehawa.mantarobot.commands.currency.item.ItemStack) TreeCommand(net.kodehawa.mantarobot.core.modules.commands.TreeCommand) GuildMessageReceivedEvent(net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent) Subscribe(com.google.common.eventbus.Subscribe)

Aggregations

Item (net.kodehawa.mantarobot.commands.currency.item.Item)4 ItemStack (net.kodehawa.mantarobot.commands.currency.item.ItemStack)4 Player (net.kodehawa.mantarobot.db.entities.Player)4 Subscribe (com.google.common.eventbus.Subscribe)3 List (java.util.List)3 MessageEmbed (net.dv8tion.jda.core.entities.MessageEmbed)3 User (net.dv8tion.jda.core.entities.User)3 GuildMessageReceivedEvent (net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent)3 SimpleCommand (net.kodehawa.mantarobot.core.modules.commands.SimpleCommand)3 RateLimiter (net.kodehawa.mantarobot.utils.commands.RateLimiter)3 StringUtils (br.com.brjdevs.java.utils.texts.StringUtils)2 RethinkDB.r (com.rethinkdb.RethinkDB.r)2 OptArgs (com.rethinkdb.model.OptArgs)2 Connection (com.rethinkdb.net.Connection)2 Cursor (com.rethinkdb.net.Cursor)2 java.awt (java.awt)2 java.util (java.util)2 TimeUnit (java.util.concurrent.TimeUnit)2 Collectors (java.util.stream.Collectors)2 Stream (java.util.stream.Stream)2