Search in sources :

Example 71 with Sx4CommandEvent

use of com.sx4.bot.core.Sx4CommandEvent in project Sx4 by sx4-discord-bot.

the class HelpCommand method onCommand.

public void onCommand(Sx4CommandEvent event, @Argument(value = "command | module", endless = true, nullDefault = true) String commandName) {
    boolean embed = !event.isFromGuild() || event.getGuild().getSelfMember().hasPermission(event.getGuildChannel(), Permission.MESSAGE_EMBED_LINKS);
    if (commandName == null) {
        List<Sx4Category> categories = Arrays.stream(ModuleCategory.ALL_ARRAY).filter(category -> !category.getCommands(event.isAuthorDeveloper()).isEmpty()).collect(Collectors.toList());
        PagedResult<Sx4Category> paged = new PagedResult<>(event.getBot(), categories).setPerPage(categories.size()).setSelect(SelectType.OBJECT).setSelectablePredicate((content, category) -> category.getName().equalsIgnoreCase(content) || Arrays.stream(category.getAliases()).anyMatch(content::equalsIgnoreCase)).setCustomFunction(page -> {
            MessageBuilder builder = new MessageBuilder();
            EmbedBuilder embedBuilder = new EmbedBuilder();
            embedBuilder.setAuthor("Help", null, event.getSelfUser().getEffectiveAvatarUrl());
            embedBuilder.setFooter(event.getPrefix() + "help <module> or respond below with a name of a module", event.getAuthor().getEffectiveAvatarUrl());
            embedBuilder.setDescription("All commands are put in a set category also known as a module, use `" + event.getPrefix() + "help <module>` on the module of your choice, The bot will then " + "list all the commands in that module. If you need further help feel free to join the [support server](https://discord.gg/PqJNcfB).");
            embedBuilder.addField("Modules", "`" + categories.stream().map(Sx4Category::getName).collect(Collectors.joining("`, `")) + "`", false);
            return builder.setEmbeds(embedBuilder.build());
        });
        paged.onSelect(select -> {
            Sx4Category category = select.getSelected();
            List<Sx4Command> categoryCommands = category.getCommands(event.isAuthorDeveloper()).stream().map(Sx4Command.class::cast).sorted(Comparator.comparing(Sx4Command::getCommandTrigger)).collect(Collectors.toList());
            PagedResult<Sx4Command> categoryPaged = HelpUtility.getCommandsPaged(event.getBot(), categoryCommands).setAuthor(category.getName(), null, event.getAuthor().getEffectiveAvatarUrl());
            categoryPaged.onSelect(categorySelect -> event.reply(HelpUtility.getHelpMessage(categorySelect.getSelected(), embed)).queue());
            categoryPaged.execute(event);
        });
        paged.execute(event);
    } else {
        Sx4Category category = SearchUtility.getModule(commandName);
        List<Sx4Command> commands = SearchUtility.getCommands(event.getCommandListener(), commandName, event.isAuthorDeveloper());
        if (category != null) {
            List<Sx4Command> categoryCommands = category.getCommands(event.isAuthorDeveloper()).stream().map(Sx4Command.class::cast).sorted(Comparator.comparing(Sx4Command::getCommandTrigger)).collect(Collectors.toList());
            PagedResult<Sx4Command> paged = HelpUtility.getCommandsPaged(event.getBot(), categoryCommands).setAuthor(category.getName(), null, event.getAuthor().getEffectiveAvatarUrl());
            paged.onSelect(select -> event.reply(HelpUtility.getHelpMessage(select.getSelected(), embed)).queue());
            paged.execute(event);
        } else if (!commands.isEmpty()) {
            PagedResult<Sx4Command> paged = new PagedResult<>(event.getBot(), commands).setAuthor(commandName, null, event.getAuthor().getEffectiveAvatarUrl()).setAutoSelect(true).setPerPage(15).setSelectablePredicate((content, command) -> command.getCommandTrigger().equals(content)).setDisplayFunction(Sx4Command::getUsage);
            paged.onSelect(select -> event.reply(HelpUtility.getHelpMessage(select.getSelected(), embed)).queue());
            paged.execute(event);
        } else {
            event.replyFailure("I could not find that command/module").queue();
        }
    }
}
Also used : Arrays(java.util.Arrays) Sx4Command(com.sx4.bot.core.Sx4Command) Permission(net.dv8tion.jda.api.Permission) SearchUtility(com.sx4.bot.utility.SearchUtility) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) PagedResult(com.sx4.bot.paged.PagedResult) Collectors(java.util.stream.Collectors) ModuleCategory(com.sx4.bot.category.ModuleCategory) HelpUtility(com.sx4.bot.utility.HelpUtility) Sx4Category(com.sx4.bot.core.Sx4Category) List(java.util.List) SelectType(com.sx4.bot.paged.PagedResult.SelectType) MessageBuilder(net.dv8tion.jda.api.MessageBuilder) Sx4CommandEvent(com.sx4.bot.core.Sx4CommandEvent) Comparator(java.util.Comparator) Argument(com.jockie.bot.core.argument.Argument) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Sx4Command(com.sx4.bot.core.Sx4Command) MessageBuilder(net.dv8tion.jda.api.MessageBuilder) Sx4Category(com.sx4.bot.core.Sx4Category) PagedResult(com.sx4.bot.paged.PagedResult)

Example 72 with Sx4CommandEvent

use of com.sx4.bot.core.Sx4CommandEvent in project Sx4 by sx4-discord-bot.

the class ShardInfoCommand method onCommand.

public void onCommand(Sx4CommandEvent event) {
    long totalGuilds = event.getShardManager().getGuildCache().size(), totalUsers = event.getShardManager().getUserCache().size();
    List<JDA> shards = new ArrayList<>(event.getShardManager().getShards());
    shards.sort(Comparator.comparingInt(a -> a.getShardInfo().getShardId()));
    JDA.ShardInfo shardInfo = event.getJDA().getShardInfo();
    PagedResult<JDA> paged = new PagedResult<>(event.getBot(), shards).setPerPage(9).setCustomFunction(page -> {
        EmbedBuilder embed = new EmbedBuilder();
        embed.setDescription(String.format("```prolog\nTotal Shards: %d\nTotal Servers: %,d\nTotal Members: %,d\nAverage Ping: %.0fms```", shardInfo.getShardTotal(), totalGuilds, totalUsers, event.getShardManager().getAverageGatewayPing()));
        embed.setAuthor("Shard Info!", null, event.getSelfUser().getEffectiveAvatarUrl());
        embed.setFooter("next | previous | go to <page> | cancel");
        page.forEach((shard, index) -> {
            String currentShard = shardInfo.getShardId() == index ? "\\> " : "";
            embed.addField(currentShard + "Shard " + (index + 1), String.format("%,d servers\n%,d members\n%dms\n%s", shard.getGuilds().size(), shard.getUsers().size(), shard.getGatewayPing(), shard.getStatus()), true);
        });
        return new MessageBuilder().setEmbeds(embed.build());
    });
    paged.execute(event);
}
Also used : ModuleCategory(com.sx4.bot.category.ModuleCategory) List(java.util.List) JDA(net.dv8tion.jda.api.JDA) MessageBuilder(net.dv8tion.jda.api.MessageBuilder) Sx4Command(com.sx4.bot.core.Sx4Command) Sx4CommandEvent(com.sx4.bot.core.Sx4CommandEvent) Permission(net.dv8tion.jda.api.Permission) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Comparator(java.util.Comparator) PagedResult(com.sx4.bot.paged.PagedResult) ArrayList(java.util.ArrayList) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) MessageBuilder(net.dv8tion.jda.api.MessageBuilder) JDA(net.dv8tion.jda.api.JDA) ArrayList(java.util.ArrayList) PagedResult(com.sx4.bot.paged.PagedResult)

Example 73 with Sx4CommandEvent

use of com.sx4.bot.core.Sx4CommandEvent in project Sx4 by sx4-discord-bot.

the class ShortenCommand method onCommand.

public void onCommand(Sx4CommandEvent event, @Argument(value = "url") String url) {
    Request request = new Request.Builder().url("https://api-ssl.bitly.com/v4/shorten").post(RequestBody.create(MediaType.parse("application/json; charset=utf-8"), new Document("long_url", url).toJson())).addHeader("Authorization", "Bearer " + event.getConfig().getBitly()).addHeader("Content-Type", "application/json").build();
    event.getHttpClient().newCall(request).enqueue((HttpCallback) response -> {
        Document json = Document.parse(response.body().string());
        event.replyFormat("<" + json.getString("link") + ">").queue();
    });
}
Also used : Document(org.bson.Document) ModuleCategory(com.sx4.bot.category.ModuleCategory) Request(okhttp3.Request) HttpCallback(com.sx4.bot.http.HttpCallback) Sx4Command(com.sx4.bot.core.Sx4Command) Sx4CommandEvent(com.sx4.bot.core.Sx4CommandEvent) MediaType(okhttp3.MediaType) Argument(com.jockie.bot.core.argument.Argument) RequestBody(okhttp3.RequestBody) Request(okhttp3.Request) Document(org.bson.Document)

Example 74 with Sx4CommandEvent

use of com.sx4.bot.core.Sx4CommandEvent in project Sx4 by sx4-discord-bot.

the class SteamCommand method compare.

@Command(value = "compare", description = "Compare what games 2 steam accounts have in common")
@CommandId(279)
@Examples({ "steam compare dog cat", "steam compare https://steamcommunity.com/id/dog https://steamcommunity.com/id/cat" })
@BotPermissions(permissions = { Permission.MESSAGE_EMBED_LINKS })
public void compare(Sx4CommandEvent event, @Argument(value = "first profile") String firstQuery, @Argument(value = "second profile", endless = true) String secondQuery) {
    String firstUrl = this.getProfileUrl(firstQuery), secondUrl = this.getProfileUrl(secondQuery);
    Request firstRequest = new Request.Builder().url(firstUrl + "games/?tab=all&xml=1").build();
    Request secondRequest = new Request.Builder().url(secondUrl + "games/?tab=all&xml=1").build();
    event.getHttpClient().newCall(firstRequest).enqueue((HttpCallback) firstResponse -> {
        JSONObject firstData = XML.toJSONObject(firstResponse.body().string()).getJSONObject("gamesList");
        if (firstData.has("error")) {
            event.replyFailure("The steam profile <https://steamcommunity.com/profiles/" + firstData.getLong("steamID64") + "> is private").queue();
            return;
        }
        event.getHttpClient().newCall(secondRequest).enqueue((HttpCallback) secondResponse -> {
            JSONObject secondData = XML.toJSONObject(secondResponse.body().string()).getJSONObject("gamesList");
            if (secondData.has("error")) {
                event.replyFailure("The steam profile <https://steamcommunity.com/profiles/" + secondData.getLong("steamID64") + "> is private").queue();
                return;
            }
            JSONArray firstGames = firstData.getJSONObject("games").getJSONArray("game"), secondGames = secondData.getJSONObject("games").getJSONArray("game");
            Map<Integer, String> commonGames = new HashMap<>();
            for (int x = 0; x < firstGames.length(); x++) {
                for (int y = 0; y < secondGames.length(); y++) {
                    JSONObject firstGame = firstGames.getJSONObject(x), secondGame = secondGames.getJSONObject(y);
                    if (firstGame.getInt("appID") == secondGame.getInt("appID")) {
                        commonGames.put(firstGame.getInt("appID"), firstGame.getString("name"));
                    }
                }
            }
            PagedResult<Map.Entry<Integer, String>> paged = new PagedResult<>(event.getBot(), new ArrayList<>(commonGames.entrySet())).setAuthor("Games In Common (" + commonGames.size() + ")", null, "https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Steam_icon_logo.svg/2000px-Steam_icon_logo.svg.png").setPerPage(15).setIncreasedIndex(true).setDisplayFunction(d -> "[" + d.getValue() + "](https://store.steampowered.com/app/" + d.getKey() + ")");
            paged.execute(event);
        });
    });
}
Also used : Document(org.bson.Document) java.util(java.util) Command(com.jockie.bot.core.command.Command) TextNode(org.jsoup.nodes.TextNode) Permission(net.dv8tion.jda.api.Permission) Projections(com.mongodb.client.model.Projections) CommandId(com.sx4.bot.annotations.command.CommandId) Cooldown(com.jockie.bot.core.command.Command.Cooldown) PagedResult(com.sx4.bot.paged.PagedResult) JSONObject(org.json.JSONObject) Matcher(java.util.regex.Matcher) XML(org.json.XML) Sx4CommandEvent(com.sx4.bot.core.Sx4CommandEvent) Element(org.jsoup.nodes.Element) Option(com.jockie.bot.core.option.Option) BotPermissions(com.sx4.bot.annotations.command.BotPermissions) Argument(com.jockie.bot.core.argument.Argument) Request(okhttp3.Request) HmacUtility(com.sx4.bot.utility.HmacUtility) HttpCallback(com.sx4.bot.http.HttpCallback) Sx4Command(com.sx4.bot.core.Sx4Command) NumberUtility(com.sx4.bot.utility.NumberUtility) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) StandardCharsets(java.nio.charset.StandardCharsets) ModuleCategory(com.sx4.bot.category.ModuleCategory) URLEncoder(java.net.URLEncoder) Examples(com.sx4.bot.annotations.command.Examples) MessageBuilder(net.dv8tion.jda.api.MessageBuilder) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) LocalDate(java.time.LocalDate) DateTimeFormatter(java.time.format.DateTimeFormatter) InvalidKeyException(java.security.InvalidKeyException) MessageEmbed(net.dv8tion.jda.api.entities.MessageEmbed) Jsoup(org.jsoup.Jsoup) Pattern(java.util.regex.Pattern) StringUtility(com.sx4.bot.utility.StringUtility) JSONArray(org.json.JSONArray) SteamGameCache(com.sx4.bot.cache.SteamGameCache) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) MessageBuilder(net.dv8tion.jda.api.MessageBuilder) Request(okhttp3.Request) HttpCallback(com.sx4.bot.http.HttpCallback) JSONArray(org.json.JSONArray) JSONObject(org.json.JSONObject) PagedResult(com.sx4.bot.paged.PagedResult) BotPermissions(com.sx4.bot.annotations.command.BotPermissions) Command(com.jockie.bot.core.command.Command) Sx4Command(com.sx4.bot.core.Sx4Command) CommandId(com.sx4.bot.annotations.command.CommandId) Examples(com.sx4.bot.annotations.command.Examples)

Example 75 with Sx4CommandEvent

use of com.sx4.bot.core.Sx4CommandEvent in project Sx4 by sx4-discord-bot.

the class SteamCommand method inventory.

@Command(value = "inventory", description = "Look at your steam inventory for a game")
@CommandId(505)
@Examples({ "steam inventory Intruder", "steam inventory Counter-Strike" })
@BotPermissions(permissions = { Permission.MESSAGE_EMBED_LINKS })
public void inventory(Sx4CommandEvent event, @Argument(value = "game", endless = true) String query) {
    SteamGameCache cache = event.getBot().getSteamGameCache();
    if (cache.getGames().isEmpty()) {
        event.replyFailure("The steam cache is currently empty, try again").queue();
        return;
    }
    Matcher urlMatcher;
    List<Document> games;
    if (NumberUtility.isNumberUnsigned(query)) {
        games = List.of(new Document("appid", Integer.parseInt(query)));
    } else if ((urlMatcher = this.gamePattern.matcher(query)).matches()) {
        games = List.of(new Document("appid", Integer.parseInt(urlMatcher.group(1))));
    } else {
        games = cache.getGames(query);
        if (games.isEmpty()) {
            event.replyFailure("I could not find any games with that query").queue();
            return;
        }
    }
    PagedResult<Document> gamePaged = new PagedResult<>(event.getBot(), games).setAuthor("Steam Search", null, "https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Steam_icon_logo.svg/2000px-Steam_icon_logo.svg.png").setIncreasedIndex(true).setAutoSelect(true).setTimeout(60).setDisplayFunction(game -> game.getString("name"));
    gamePaged.onSelect(gameSelect -> {
        int game = gameSelect.getSelected().getInteger("appid");
        List<Document> connections = event.getMongo().getUserById(event.getAuthor().getIdLong(), Projections.include("connections.steam")).getEmbedded(List.of("connections", "steam"), Collections.emptyList());
        if (connections.isEmpty()) {
            event.replyFailure("You do not have a steam account linked, use `steam connect` to link an account or provide an argument to search").queue();
            return;
        }
        List<Document> profiles = connections.stream().map(data -> data.append("url", "https://steamcommunity.com/profiles/" + data.getLong("id") + "/")).collect(Collectors.toList());
        PagedResult<Document> profilePaged = new PagedResult<>(event.getBot(), profiles).setAutoSelect(true).setAuthor("Steam Profiles", null, "https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Steam_icon_logo.svg/2000px-Steam_icon_logo.svg.png").setDisplayFunction(data -> "[" + data.getString("name") + "](" + data.getString("url") + ")");
        profilePaged.onSelect(profileSelect -> {
            long id = profileSelect.getSelected().getLong("id");
            Request request = new Request.Builder().url("https://steamcommunity.com/inventory/" + id + "/" + game + "/2?l=english&count=5000").build();
            event.getHttpClient().newCall(request).enqueue((HttpCallback) response -> {
                String body = response.body().string();
                if (body.equals("null")) {
                    event.replyFailure("Your inventory is set to private").queue();
                    return;
                }
                Document json = Document.parse(body);
                if (json.containsKey("error")) {
                    event.replyFailure("That game does not have inventory items").queue();
                    return;
                }
                int totalCount = json.getInteger("total_inventory_count");
                if (totalCount == 0) {
                    event.replyFailure("You do not have any inventory items for this game").queue();
                    return;
                }
                List<Document> items = json.getList("descriptions", Document.class);
                List<Document> assets = json.getList("assets", Document.class);
                PagedResult<Document> itemPaged = new PagedResult<>(event.getBot(), items).setSelect().setPerPage(1).cachePages(true).setAsyncFunction((page, message) -> {
                    EmbedBuilder embed = new EmbedBuilder();
                    embed.setFooter("Item " + page.getPage() + "/" + page.getMaxPage());
                    page.forEach((item, index) -> {
                        Document asset = assets.stream().filter(d -> d.getString("classid").equals(item.getString("classid"))).findFirst().orElse(null);
                        List<Document> descriptions = item.getList("descriptions", Document.class);
                        StringJoiner joiner = new StringJoiner("\n");
                        for (Document description : descriptions) {
                            String value = description.getString("value");
                            if (value.isBlank()) {
                                continue;
                            }
                            Element element = Jsoup.parse(value.replace("*", "\\*"));
                            for (Element italicElement : element.getElementsByTag("i")) {
                                italicElement.replaceWith(new TextNode("*" + italicElement.text() + "*"));
                            }
                            for (Element boldElement : element.getElementsByTag("b")) {
                                boldElement.replaceWith(new TextNode("**" + boldElement.text() + "**"));
                            }
                            joiner.add(element.text());
                        }
                        String inspect = item.getList("actions", Document.class, Collections.emptyList()).stream().filter(d -> d.getString("name").equals("Inspect in Game...")).map(d -> d.getString("link")).findFirst().orElse(null);
                        embed.setDescription(joiner.toString());
                        embed.setTitle(item.getString("market_name"), "https://steamcommunity.com/profiles/" + id + "/inventory/#" + game + (asset == null ? "" : "_2_" + asset.getString("assetid")));
                        embed.setImage("https://community.cloudflare.steamstatic.com/economy/image/" + item.getString("icon_url"));
                        if (inspect != null) {
                            embed.addField("Inspect In Game", "<" + inspect + ">", false);
                        }
                        Request itemRequest = new Request.Builder().url("https://steamcommunity.com/market/priceoverview/?appid=" + game + "&currency=2&market_hash_name=" + URLEncoder.encode(item.getString("market_hash_name"), StandardCharsets.UTF_8)).build();
                        event.getHttpClient().newCall(itemRequest).enqueue((HttpCallback) itemResponse -> {
                            String itemBody = itemResponse.body().string();
                            if (itemBody.equals("null")) {
                                message.accept(new MessageBuilder().setEmbeds(embed.build()));
                                return;
                            }
                            Document priceData = Document.parse(itemBody);
                            if (priceData.getBoolean("success") && priceData.containsKey("lowest_price")) {
                                embed.addField("Lowest Price", priceData.getString("lowest_price"), false);
                            }
                            message.accept(new MessageBuilder().setEmbeds(embed.build()));
                        });
                    });
                });
                itemPaged.execute(event);
            });
        });
        profilePaged.execute(event);
    });
    gamePaged.execute(event);
}
Also used : Document(org.bson.Document) java.util(java.util) Command(com.jockie.bot.core.command.Command) TextNode(org.jsoup.nodes.TextNode) Permission(net.dv8tion.jda.api.Permission) Projections(com.mongodb.client.model.Projections) CommandId(com.sx4.bot.annotations.command.CommandId) Cooldown(com.jockie.bot.core.command.Command.Cooldown) PagedResult(com.sx4.bot.paged.PagedResult) JSONObject(org.json.JSONObject) Matcher(java.util.regex.Matcher) XML(org.json.XML) Sx4CommandEvent(com.sx4.bot.core.Sx4CommandEvent) Element(org.jsoup.nodes.Element) Option(com.jockie.bot.core.option.Option) BotPermissions(com.sx4.bot.annotations.command.BotPermissions) Argument(com.jockie.bot.core.argument.Argument) Request(okhttp3.Request) HmacUtility(com.sx4.bot.utility.HmacUtility) HttpCallback(com.sx4.bot.http.HttpCallback) Sx4Command(com.sx4.bot.core.Sx4Command) NumberUtility(com.sx4.bot.utility.NumberUtility) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) StandardCharsets(java.nio.charset.StandardCharsets) ModuleCategory(com.sx4.bot.category.ModuleCategory) URLEncoder(java.net.URLEncoder) Examples(com.sx4.bot.annotations.command.Examples) MessageBuilder(net.dv8tion.jda.api.MessageBuilder) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) LocalDate(java.time.LocalDate) DateTimeFormatter(java.time.format.DateTimeFormatter) InvalidKeyException(java.security.InvalidKeyException) MessageEmbed(net.dv8tion.jda.api.entities.MessageEmbed) Jsoup(org.jsoup.Jsoup) Pattern(java.util.regex.Pattern) StringUtility(com.sx4.bot.utility.StringUtility) JSONArray(org.json.JSONArray) SteamGameCache(com.sx4.bot.cache.SteamGameCache) Matcher(java.util.regex.Matcher) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) MessageBuilder(net.dv8tion.jda.api.MessageBuilder) Element(org.jsoup.nodes.Element) Request(okhttp3.Request) HttpCallback(com.sx4.bot.http.HttpCallback) TextNode(org.jsoup.nodes.TextNode) Document(org.bson.Document) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) MessageBuilder(net.dv8tion.jda.api.MessageBuilder) SteamGameCache(com.sx4.bot.cache.SteamGameCache) PagedResult(com.sx4.bot.paged.PagedResult) BotPermissions(com.sx4.bot.annotations.command.BotPermissions) Command(com.jockie.bot.core.command.Command) Sx4Command(com.sx4.bot.core.Sx4Command) CommandId(com.sx4.bot.annotations.command.CommandId) Examples(com.sx4.bot.annotations.command.Examples)

Aggregations

Sx4Command (com.sx4.bot.core.Sx4Command)255 Command (com.jockie.bot.core.command.Command)181 Document (org.bson.Document)153 ModuleCategory (com.sx4.bot.category.ModuleCategory)130 Sx4CommandEvent (com.sx4.bot.core.Sx4CommandEvent)130 CommandId (com.sx4.bot.annotations.command.CommandId)121 Argument (com.jockie.bot.core.argument.Argument)119 Examples (com.sx4.bot.annotations.command.Examples)119 EmbedBuilder (net.dv8tion.jda.api.EmbedBuilder)119 Permission (net.dv8tion.jda.api.Permission)119 Bson (org.bson.conversions.Bson)111 PagedResult (com.sx4.bot.paged.PagedResult)90 HttpCallback (com.sx4.bot.http.HttpCallback)69 Request (okhttp3.Request)68 AuthorPermissions (com.sx4.bot.annotations.command.AuthorPermissions)60 User (net.dv8tion.jda.api.entities.User)57 MessageBuilder (net.dv8tion.jda.api.MessageBuilder)55 ExceptionUtility (com.sx4.bot.utility.ExceptionUtility)54 Operators (com.sx4.bot.database.mongo.model.Operators)50 List (java.util.List)50