Search in sources :

Example 1 with Command

use of net.kodehawa.mantarobot.modules.Command in project MantaroBot by Mantaro.

the class ActionCmds method meow.

@Command
public static void meow(CommandRegistry registry) {
    registry.register("meow", new SimpleCommand(Category.ACTION) {

        @Override
        protected void call(GuildMessageReceivedEvent event, String content, String[] args) {
            Message receivedMessage = event.getMessage();
            if (!receivedMessage.getMentionedUsers().isEmpty()) {
                String mew = event.getMessage().getMentionedUsers().stream().map(IMentionable::getAsMention).collect(Collectors.joining(" "));
                event.getChannel().sendFile(ImageActionCmd.CACHE.getInput("http://imgur.com/yFGHvVR.gif"), "mew.gif", new MessageBuilder().append(EmoteReference.TALKING).append(String.format("%s *is meowing at %s.*", event.getAuthor().getAsMention(), mew)).build()).queue();
            } else {
                event.getChannel().sendFile(ImageActionCmd.CACHE.getInput("http://imgur.com/yFGHvVR.gif"), "mew.gif", new MessageBuilder().append(":speech_balloon: Meow.").build()).queue();
            }
        }

        @Override
        public MessageEmbed help(GuildMessageReceivedEvent event) {
            return helpEmbed(event, "Meow command").setDescription("**Meow either to a person or the sky**.").setColor(Color.cyan).build();
        }
    });
    registry.registerAlias("meow", "mew");
}
Also used : MessageEmbed(net.dv8tion.jda.core.entities.MessageEmbed) SimpleCommand(net.kodehawa.mantarobot.modules.commands.SimpleCommand) Message(net.dv8tion.jda.core.entities.Message) IMentionable(net.dv8tion.jda.core.entities.IMentionable) MessageBuilder(net.dv8tion.jda.core.MessageBuilder) GuildMessageReceivedEvent(net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent) SimpleCommand(net.kodehawa.mantarobot.modules.commands.SimpleCommand) Command(net.kodehawa.mantarobot.modules.Command)

Example 2 with Command

use of net.kodehawa.mantarobot.modules.Command in project MantaroBot by Mantaro.

the class QuoteCmd method quote.

@Command
public static void quote(CommandRegistry cr) {
    cr.register("quote", new SimpleCommand(Category.MISC) {

        @Override
        protected void call(GuildMessageReceivedEvent event, String content, String[] args) {
            if (content.isEmpty()) {
                onHelp(event);
                return;
            }
            String action = args[0];
            String phrase = content.replace(action + " ", "");
            Guild guild = event.getGuild();
            ManagedDatabase db = MantaroData.db();
            EmbedBuilder builder = new EmbedBuilder();
            SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
            List<Message> messageHistory;
            try {
                messageHistory = event.getChannel().getHistory().retrievePast(100).complete();
            } catch (Exception e) {
                if (e instanceof PermissionException) {
                    event.getChannel().sendMessage(EmoteReference.CRYING + "I don't have permission to do this :<").queue();
                    return;
                }
                event.getChannel().sendMessage(EmoteReference.ERROR + "It seems like discord is on fire, as my" + " " + "request to retrieve message history was denied" + "with the error `" + e.getClass().getSimpleName() + "`").queue();
                log.warn("Shit exploded on Discord's backend. <@155867458203287552>", e);
                return;
            }
            if (action.equals("addfrom")) {
                Message message = messageHistory.stream().filter(msg -> msg.getContent().toLowerCase().contains(phrase.toLowerCase()) && !msg.getContent().startsWith(db.getGuild(guild).getData().getGuildCustomPrefix() == null ? MantaroData.config().get().getPrefix() : db.getGuild(guild).getData().getGuildCustomPrefix()) && !msg.getContent().startsWith(MantaroData.config().get().getPrefix())).findFirst().orElse(null);
                if (message == null) {
                    event.getChannel().sendMessage(EmoteReference.ERROR + "I couldn't find a message matching the specified search" + " criteria. Please try again with a more specific query.").queue();
                    return;
                }
                TextChannel channel = guild.getTextChannelById(message.getChannel().getId());
                Quote quote = Quote.of(guild.getMember(message.getAuthor()), channel, message);
                db.getQuotes(guild).add(quote);
                event.getChannel().sendMessage(buildQuoteEmbed(dateFormat, builder, quote)).queue();
                quote.saveAsync();
                return;
            }
            if (action.equals("random")) {
                try {
                    Quote quote = CollectionUtils.random(db.getQuotes(event.getGuild()));
                    event.getChannel().sendMessage(buildQuoteEmbed(dateFormat, builder, quote)).queue();
                } catch (Exception e) {
                    event.getChannel().sendMessage(EmoteReference.ERROR + "This server has no set quotes!").queue();
                }
                return;
            }
            if (action.equals("readfrom")) {
                try {
                    List<Quote> quotes = db.getQuotes(guild);
                    for (int i2 = 0; i2 < quotes.size(); i2++) {
                        if (quotes.get(i2).getContent().contains(phrase)) {
                            Quote quote = quotes.get(i2);
                            event.getChannel().sendMessage(buildQuoteEmbed(dateFormat, builder, quote)).queue();
                            break;
                        }
                    }
                } catch (Exception e) {
                    event.getChannel().sendMessage(EmoteReference.ERROR + "I didn't find any quotes! (no quotes match the criteria).").queue();
                }
                return;
            }
            if (action.equals("removefrom")) {
                try {
                    List<Quote> quotes = db.getQuotes(guild);
                    for (int i2 = 0; i2 < quotes.size(); i2++) {
                        if (quotes.get(i2).getContent().contains(phrase)) {
                            Quote quote = quotes.get(i2);
                            db.getQuotes(guild).remove(i2);
                            quote.saveAsync();
                            event.getChannel().sendMessage(EmoteReference.CORRECT + "Removed quote with content: " + quote.getContent()).queue();
                            break;
                        }
                    }
                } catch (Exception e) {
                    event.getChannel().sendMessage(EmoteReference.ERROR + "No quotes match the criteria.").queue();
                }
            }
        }

        @Override
        public MessageEmbed help(GuildMessageReceivedEvent event) {
            return helpEmbed(event, "Quote command").setDescription("**Quotes a message by search term.**").addField("Usage", "`~>quote addfrom <phrase>`- **Add a quote with the content defined by the specified number. For example, providing 1 will quote " + "the last message.**\n" + "`~>quote removefrom <phrase>` - **Remove a quote based on your text query.**\n" + "`~>quote readfrom <phrase>` - **Search for the first quote which matches your search criteria and prints " + "it.**\n" + "`~>quote random` - **Get a random quote.** \n", false).addField("Parameters", "`phrase` - A part of the quote phrase.", false).setColor(Color.DARK_GRAY).build();
        }
    });
}
Also used : PermissionException(net.dv8tion.jda.core.exceptions.PermissionException) SimpleCommand(net.kodehawa.mantarobot.modules.commands.SimpleCommand) Color(java.awt.Color) TextChannel(net.dv8tion.jda.core.entities.TextChannel) Date(java.util.Date) Module(net.kodehawa.mantarobot.modules.Module) SimpleDateFormat(java.text.SimpleDateFormat) Category(net.kodehawa.mantarobot.modules.commands.base.Category) Quote(net.kodehawa.mantarobot.data.entities.Quote) Message(net.dv8tion.jda.core.entities.Message) EmbedBuilder(net.dv8tion.jda.core.EmbedBuilder) Guild(net.dv8tion.jda.core.entities.Guild) PermissionException(net.dv8tion.jda.core.exceptions.PermissionException) Slf4j(lombok.extern.slf4j.Slf4j) GuildMessageReceivedEvent(net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent) List(java.util.List) CollectionUtils(br.com.brjdevs.java.utils.collections.CollectionUtils) EmoteReference(net.kodehawa.mantarobot.utils.commands.EmoteReference) MantaroData(net.kodehawa.mantarobot.data.MantaroData) ManagedDatabase(net.kodehawa.mantarobot.data.db.ManagedDatabase) CommandRegistry(net.kodehawa.mantarobot.modules.CommandRegistry) Command(net.kodehawa.mantarobot.modules.Command) MessageEmbed(net.dv8tion.jda.core.entities.MessageEmbed) MessageEmbed(net.dv8tion.jda.core.entities.MessageEmbed) Message(net.dv8tion.jda.core.entities.Message) Guild(net.dv8tion.jda.core.entities.Guild) PermissionException(net.dv8tion.jda.core.exceptions.PermissionException) Quote(net.kodehawa.mantarobot.data.entities.Quote) EmbedBuilder(net.dv8tion.jda.core.EmbedBuilder) TextChannel(net.dv8tion.jda.core.entities.TextChannel) SimpleCommand(net.kodehawa.mantarobot.modules.commands.SimpleCommand) List(java.util.List) ManagedDatabase(net.kodehawa.mantarobot.data.db.ManagedDatabase) SimpleDateFormat(java.text.SimpleDateFormat) GuildMessageReceivedEvent(net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent) SimpleCommand(net.kodehawa.mantarobot.modules.commands.SimpleCommand) Command(net.kodehawa.mantarobot.modules.Command)

Example 3 with Command

use of net.kodehawa.mantarobot.modules.Command in project MantaroBot by Mantaro.

the class MusicCmds method onPostLoad.

@Command
public static void onPostLoad(PostLoadEvent e) {
    OptsCmd.registerOption("reactionmenus:toggle", event -> {
        DBGuild dbg = MantaroData.db().getGuild(event.getGuild());
        GuildData data = dbg.getData();
        boolean t = data.isReactionMenus();
        data.setReactionMenus(!t);
        event.getChannel().sendMessage(EmoteReference.CORRECT + "**Set reaction menues to: `" + !t + "`**").queue();
        dbg.save();
    });
    OptsCmd.registerOption("fairqueue:max", (event, args) -> {
        DBGuild dbGuild = MantaroData.db().getGuild(event.getGuild());
        GuildData guildData = dbGuild.getData();
        if (args.length == 0) {
            event.getChannel().sendMessage(EmoteReference.ERROR + "You need to specify a positive integer.").queue();
            return;
        }
        String much = args[0];
        final int fq;
        try {
            fq = Integer.parseInt(much);
        } catch (Exception ex) {
            event.getChannel().sendMessage(EmoteReference.ERROR + "Not a valid number").queue();
            return;
        }
        guildData.setMaxFairQueue(fq);
        dbGuild.save();
        event.getChannel().sendMessage(EmoteReference.CORRECT + "Set max fair queue size to " + fq).queue();
    });
    OptsCmd.registerOption("musicannounce:toggle", event -> {
        DBGuild dbGuild = MantaroData.db().getGuild(event.getGuild());
        GuildData guildData = dbGuild.getData();
        boolean t1 = guildData.isMusicAnnounce();
        guildData.setMusicAnnounce(!t1);
        event.getChannel().sendMessage(EmoteReference.CORRECT + "Set no music announce to " + "**" + !t1 + "**").queue();
        dbGuild.save();
    });
    OptsCmd.registerOption("music:channel", (event, args) -> {
        if (args.length == 0) {
            OptsCmd.onHelp(event);
            return;
        }
        String channelName = String.join(" ", args);
        DBGuild dbGuild = MantaroData.db().getGuild(event.getGuild());
        GuildData guildData = dbGuild.getData();
        VoiceChannel channel = null;
        try {
            channel = event.getGuild().getVoiceChannelById(channelName);
        } catch (Exception ignored) {
        }
        if (channel == null) {
            try {
                List<VoiceChannel> voiceChannels = event.getGuild().getVoiceChannels().stream().filter(voiceChannel -> voiceChannel.getName().contains(channelName)).collect(Collectors.toList());
                if (voiceChannels.size() == 0) {
                    event.getChannel().sendMessage(EmoteReference.ERROR + "I couldn't found a voice channel matching that" + " name or id").queue();
                    return;
                } else if (voiceChannels.size() == 1) {
                    channel = voiceChannels.get(0);
                    guildData.setMusicChannel(channel.getId());
                    dbGuild.save();
                    event.getChannel().sendMessage(EmoteReference.OK + "Music Channel set to: " + channel.getName()).queue();
                } else {
                    DiscordUtils.selectList(event, voiceChannels, voiceChannel -> String.format("%s (ID: %s)", voiceChannel.getName(), voiceChannel.getId()), s -> OptsCmd.getOpts().baseEmbed(event, "Select the Channel:").setDescription(s).build(), voiceChannel -> {
                        guildData.setMusicChannel(voiceChannel.getId());
                        dbGuild.save();
                        event.getChannel().sendMessage(EmoteReference.OK + "Music Channel set to: " + voiceChannel.getName()).queue();
                    });
                }
            } catch (Exception ex) {
                log.warn("Error while setting voice channel", ex);
                event.getChannel().sendMessage("I couldn't set the voice channel " + EmoteReference.SAD + " - try again " + "in a few minutes " + "-> " + ex.getClass().getSimpleName()).queue();
            }
        }
    });
    OptsCmd.registerOption("music:queuelimit", (event, args) -> {
        if (args.length == 0) {
            OptsCmd.onHelp(event);
            return;
        }
        boolean isNumber = args[0].matches("^[0-9]*$");
        if (!isNumber) {
            event.getChannel().sendMessage(EmoteReference.ERROR + "That's not a valid number!").queue();
            return;
        }
        DBGuild dbGuild = MantaroData.db().getGuild(event.getGuild());
        GuildData guildData = dbGuild.getData();
        try {
            int finalSize = Integer.parseInt(args[0]);
            int applySize = finalSize >= 300 ? 300 : finalSize;
            guildData.setMusicQueueSizeLimit((long) applySize);
            dbGuild.save();
            event.getChannel().sendMessage(String.format(EmoteReference.MEGA + "The queue limit on this server is now " + "**%d** songs.", applySize)).queue();
            return;
        } catch (NumberFormatException ex) {
            event.getChannel().sendMessage(EmoteReference.ERROR + "You're trying to set too high of a number (which won't" + " be applied anyway), silly").queue();
        }
    });
    OptsCmd.registerOption("music:clear", (event) -> {
        DBGuild dbGuild = MantaroData.db().getGuild(event.getGuild());
        GuildData guildData = dbGuild.getData();
        guildData.setMusicSongDurationLimit(null);
        guildData.setMusicChannel(null);
        dbGuild.save();
        event.getChannel().sendMessage(EmoteReference.CORRECT + "I can play music on all channels now").queue();
    });
}
Also used : AudioPlayer(com.sedmelluq.discord.lavaplayer.player.AudioPlayer) SimpleCommand(net.kodehawa.mantarobot.modules.commands.SimpleCommand) IntStream(java.util.stream.IntStream) URL(java.net.URL) Utils(net.kodehawa.mantarobot.utils.Utils) GuildMusicManager(net.kodehawa.mantarobot.commands.music.GuildMusicManager) Module(net.kodehawa.mantarobot.modules.Module) DiscordUtils(net.kodehawa.mantarobot.utils.DiscordUtils) AudioCmdUtils(net.kodehawa.mantarobot.commands.music.AudioCmdUtils) MantaroBot(net.kodehawa.mantarobot.MantaroBot) PermissionException(net.dv8tion.jda.core.exceptions.PermissionException) GuildMessageReceivedEvent(net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent) Permission(net.dv8tion.jda.core.Permission) DBGuild(net.kodehawa.mantarobot.data.entities.DBGuild) StringUtils.replaceEach(org.apache.commons.lang3.StringUtils.replaceEach) CommandRegistry(net.kodehawa.mantarobot.modules.CommandRegistry) Command(net.kodehawa.mantarobot.modules.Command) TextChannelGround(net.kodehawa.mantarobot.commands.currency.TextChannelGround) TrackScheduler(net.kodehawa.mantarobot.commands.music.TrackScheduler) PostLoadEvent(net.kodehawa.mantarobot.modules.events.PostLoadEvent) net.dv8tion.jda.core.entities(net.dv8tion.jda.core.entities) AudioManager(net.dv8tion.jda.core.managers.AudioManager) RateLimiter(net.kodehawa.mantarobot.commands.currency.RateLimiter) Category(net.kodehawa.mantarobot.modules.commands.base.Category) AudioCmdUtils.embedForQueue(net.kodehawa.mantarobot.commands.music.AudioCmdUtils.embedForQueue) Collectors(java.util.stream.Collectors) TIntHashSet(gnu.trove.set.hash.TIntHashSet) EmbedBuilder(net.dv8tion.jda.core.EmbedBuilder) TimeUnit(java.util.concurrent.TimeUnit) Slf4j(lombok.extern.slf4j.Slf4j) List(java.util.List) Repeat(net.kodehawa.mantarobot.commands.music.Repeat) GuildData(net.kodehawa.mantarobot.data.entities.helpers.GuildData) EmoteReference(net.kodehawa.mantarobot.utils.commands.EmoteReference) TIntIterator(gnu.trove.iterator.TIntIterator) CommandPermission(net.kodehawa.mantarobot.modules.commands.CommandPermission) MantaroData(net.kodehawa.mantarobot.data.MantaroData) AudioTrack(com.sedmelluq.discord.lavaplayer.track.AudioTrack) GuildData(net.kodehawa.mantarobot.data.entities.helpers.GuildData) DBGuild(net.kodehawa.mantarobot.data.entities.DBGuild) PermissionException(net.dv8tion.jda.core.exceptions.PermissionException) SimpleCommand(net.kodehawa.mantarobot.modules.commands.SimpleCommand) Command(net.kodehawa.mantarobot.modules.Command)

Example 4 with Command

use of net.kodehawa.mantarobot.modules.Command in project MantaroBot by Mantaro.

the class ImageCmds method catgirls.

@Command
public static void catgirls(CommandRegistry cr) {
    cr.register("catgirl", new SimpleCommand(Category.IMAGE) {

        @Override
        protected void call(GuildMessageReceivedEvent event, String content, String[] args) {
            boolean nsfw = args.length > 0 && args[0].equalsIgnoreCase("nsfw");
            if (nsfw && !nsfwCheck(event, true, true))
                return;
            try {
                JSONObject obj = Unirest.get(nsfw ? NSFWURL : BASEURL).asJson().getBody().getObject();
                if (!obj.has("url")) {
                    event.getChannel().sendMessage("Unable to find image").queue();
                } else {
                    event.getChannel().sendFile(CACHE.getInput(obj.getString("url")), "catgirl.png", null).queue();
                }
            } catch (UnirestException e) {
                e.printStackTrace();
                event.getChannel().sendMessage("Unable to get image").queue();
            }
        }

        @Override
        public MessageEmbed help(GuildMessageReceivedEvent event) {
            return helpEmbed(event, "Catgirl command").setDescription("**Sends catgirl images**").addField("Usage", "`~>catgirl` - **Returns catgirl images.**" + "\n´`~>catgirl nsfw` - **Returns lewd or questionable cargirl images.**", false).build();
        }
    });
}
Also used : MessageEmbed(net.dv8tion.jda.core.entities.MessageEmbed) SimpleCommand(net.kodehawa.mantarobot.modules.commands.SimpleCommand) JSONObject(org.json.JSONObject) UnirestException(com.mashape.unirest.http.exceptions.UnirestException) GuildMessageReceivedEvent(net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent) SimpleCommand(net.kodehawa.mantarobot.modules.commands.SimpleCommand) Command(net.kodehawa.mantarobot.modules.Command)

Example 5 with Command

use of net.kodehawa.mantarobot.modules.Command in project MantaroBot by Mantaro.

the class ImageCmds method rule34.

@Command
public static void rule34(CommandRegistry cr) {
    cr.register("rule34", new SimpleCommand(Category.IMAGE) {

        @Override
        protected void call(GuildMessageReceivedEvent event, String content, String[] args) {
            if (!nsfwCheck(event, true, true))
                return;
            String noArgs = content.split(" ")[0];
            TextChannelGround.of(event).dropItemWithChance(13, 3);
            switch(noArgs) {
                case "get":
                    try {
                        String whole1 = content.replace("get ", "");
                        String[] wholeBeheaded = whole1.split(" ");
                        Rule34.get(60, image -> {
                            try {
                                int number;
                                try {
                                    number = Integer.parseInt(wholeBeheaded[0]);
                                } catch (Exception e) {
                                    number = r.nextInt(image.size());
                                }
                                String TAGS = image.get(number).getTags().replace(" ", " ,");
                                EmbedBuilder builder = new EmbedBuilder();
                                builder.setAuthor("Found image", null, "http:" + image.get(number - 1).getFile_url()).setImage("http:" + image.get(number - 1).getFile_url()).addField("Width", String.valueOf(image.get(number - 1).getWidth()), true).addField("Height", String.valueOf(image.get(number - 1).getHeight()), true).addField("Tags", "``" + (TAGS == null ? "None" : TAGS) + "``", false).setFooter("If the image doesn't load, click the title.", null);
                                event.getChannel().sendMessage(builder.build()).queue();
                            } catch (ArrayIndexOutOfBoundsException e) {
                                event.getChannel().sendMessage(EmoteReference.ERROR + "**There aren't more images or no results found**! Try with a lower number.").queue();
                            }
                        });
                    } catch (Exception exception) {
                        if (exception instanceof NumberFormatException)
                            event.getChannel().sendMessage(EmoteReference.ERROR + "Wrong argument type. Check ~>help rule34").queue(message -> message.delete().queueAfter(10, TimeUnit.SECONDS));
                    }
                    break;
                case "tags":
                    try {
                        try {
                            boolean isOldFormat = args[1].matches("^[0-9]*$");
                            if (isOldFormat) {
                                event.getChannel().sendMessage(EmoteReference.WARNING + "Now you don't need to specify the page number. Please use ~>rule34 tags <tag>").queue();
                                return;
                            }
                            String sNoArgs = content.replace("tags ", "");
                            String[] expectedNumber = sNoArgs.split(" ");
                            String tags = expectedNumber[0];
                            Rule34.onSearch(60, tags, images -> {
                                try {
                                    try {
                                        number1 = Integer.parseInt(expectedNumber[2]);
                                    } catch (Exception e) {
                                        number1 = r.nextInt(images.size() > 0 ? images.size() - 1 : images.size());
                                    }
                                    String TAGS = images.get(number).getTags() == null ? tags : images.get(number).getTags().replace(" ", " ,");
                                    EmbedBuilder builder = new EmbedBuilder();
                                    builder.setAuthor("Found image", null, "http:" + images.get(number1 - 1).getFile_url()).setImage("http:" + images.get(number1 - 1).getFile_url()).addField("Width", String.valueOf(images.get(number1 - 1).getWidth()), true).addField("Height", String.valueOf(images.get(number1 - 1).getHeight()), true).addField("Tags", "``" + (TAGS == null ? "None" : TAGS) + "``", false).setFooter("If the image doesn't load, click the title.", null);
                                    event.getChannel().sendMessage(builder.build()).queue();
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    event.getChannel().sendMessage(EmoteReference.ERROR + "**There aren't more images or no results found**! Try with a lower number.").queue();
                                }
                            });
                        } catch (Exception exception) {
                            if (exception instanceof NumberFormatException)
                                event.getChannel().sendMessage(EmoteReference.ERROR + "Wrong argument type. Check ~>help rule34").queue(message -> message.delete().queueAfter(10, TimeUnit.SECONDS));
                        }
                    } catch (NullPointerException e) {
                        event.getChannel().sendMessage(EmoteReference.ERROR + "Rule34 decided to not fetch the image. Well, you can try with another number or tag.").queue();
                    }
                    break;
                default:
                    onHelp(event);
                    break;
            }
        }

        @Override
        public MessageEmbed help(GuildMessageReceivedEvent event) {
            return helpEmbed(event, "rule34.xxx commmand").setColor(Color.PINK).setDescription("**Retrieves images from the rule34 (hentai) image board.**").addField("Usage", "`~>rule34 get <imagenumber>` - **Gets an image based in parameters.**\n" + "`~>rule34 tags <tag> <imagenumber>` - **Gets an image based in the specified tag and parameters.**\n", false).addField("Parameters", "`page` - **Can be any value from 1 to the rule34 maximum page. Probably around 4000.**\n" + "`imagenumber` - **(OPTIONAL) Any number from 1 to the maximum possible images to get, specified by the first instance of the command.**\n" + "`tag` - **Any valid image tag. For example animal_ears or original.**", false).build();
        }
    });
}
Also used : SimpleCommand(net.kodehawa.mantarobot.modules.commands.SimpleCommand) Color(java.awt.Color) Arrays(java.util.Arrays) YandereImageData(net.kodehawa.mantarobot.commands.image.YandereImageData) TextChannel(net.dv8tion.jda.core.entities.TextChannel) Utils(net.kodehawa.mantarobot.utils.Utils) UnirestException(com.mashape.unirest.http.exceptions.UnirestException) Module(net.kodehawa.mantarobot.modules.Module) Wallpaper(net.kodehawa.lib.imageboards.konachan.main.entities.Wallpaper) Random(java.util.Random) ArrayList(java.util.ArrayList) Unirest(com.mashape.unirest.http.Unirest) MessageBuilder(net.dv8tion.jda.core.MessageBuilder) GuildMessageReceivedEvent(net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent) OptsCmd.registerOption(net.kodehawa.mantarobot.commands.OptsCmd.registerOption) URLCache(net.kodehawa.mantarobot.utils.cache.URLCache) JSONObject(org.json.JSONObject) DBGuild(net.kodehawa.mantarobot.data.entities.DBGuild) CommandRegistry(net.kodehawa.mantarobot.modules.CommandRegistry) Command(net.kodehawa.mantarobot.modules.Command) MessageEmbed(net.dv8tion.jda.core.entities.MessageEmbed) BidiMap(org.apache.commons.collections4.BidiMap) TextChannelGround(net.kodehawa.mantarobot.commands.currency.TextChannelGround) PostLoadEvent(net.kodehawa.mantarobot.modules.events.PostLoadEvent) DualHashBidiMap(org.apache.commons.collections4.bidimap.DualHashBidiMap) Category(net.kodehawa.mantarobot.modules.commands.base.Category) GsonDataManager(net.kodehawa.mantarobot.utils.data.GsonDataManager) Collectors(java.util.stream.Collectors) EmbedBuilder(net.dv8tion.jda.core.EmbedBuilder) TimeUnit(java.util.concurrent.TimeUnit) URLEncoder(java.net.URLEncoder) List(java.util.List) CollectionUtils(br.com.brjdevs.java.utils.collections.CollectionUtils) Rule34(net.kodehawa.lib.imageboards.rule34.Rule34) GuildData(net.kodehawa.mantarobot.data.entities.helpers.GuildData) EmoteReference(net.kodehawa.mantarobot.utils.commands.EmoteReference) MantaroData(net.kodehawa.mantarobot.data.MantaroData) net.kodehawa.lib.imageboards.e621.e621(net.kodehawa.lib.imageboards.e621.e621) Konachan(net.kodehawa.lib.imageboards.konachan.Konachan) UnsupportedEncodingException(java.io.UnsupportedEncodingException) EmbedBuilder(net.dv8tion.jda.core.EmbedBuilder) MessageEmbed(net.dv8tion.jda.core.entities.MessageEmbed) SimpleCommand(net.kodehawa.mantarobot.modules.commands.SimpleCommand) GuildMessageReceivedEvent(net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent) UnirestException(com.mashape.unirest.http.exceptions.UnirestException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) SimpleCommand(net.kodehawa.mantarobot.modules.commands.SimpleCommand) Command(net.kodehawa.mantarobot.modules.Command)

Aggregations

Command (net.kodehawa.mantarobot.modules.Command)13 SimpleCommand (net.kodehawa.mantarobot.modules.commands.SimpleCommand)13 DBGuild (net.kodehawa.mantarobot.data.entities.DBGuild)9 GuildData (net.kodehawa.mantarobot.data.entities.helpers.GuildData)9 GuildMessageReceivedEvent (net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent)8 MessageEmbed (net.dv8tion.jda.core.entities.MessageEmbed)5 MantaroData (net.kodehawa.mantarobot.data.MantaroData)5 CommandRegistry (net.kodehawa.mantarobot.modules.CommandRegistry)5 Module (net.kodehawa.mantarobot.modules.Module)5 Category (net.kodehawa.mantarobot.modules.commands.base.Category)5 EmoteReference (net.kodehawa.mantarobot.utils.commands.EmoteReference)5 List (java.util.List)4 Collectors (java.util.stream.Collectors)4 EmbedBuilder (net.dv8tion.jda.core.EmbedBuilder)4 TextChannelGround (net.kodehawa.mantarobot.commands.currency.TextChannelGround)4 PostLoadEvent (net.kodehawa.mantarobot.modules.events.PostLoadEvent)4 Utils (net.kodehawa.mantarobot.utils.Utils)4 Color (java.awt.Color)3 TimeUnit (java.util.concurrent.TimeUnit)3 Slf4j (lombok.extern.slf4j.Slf4j)3