This commit is contained in:
anthorob committed 2026-10-14 08:24:33 -04:00
1 parent 6134c893ab
commit 545c09d502
3 files changed
+8 -8

No files matched your search

@@ -114,7 +114,7 @@ public final class GuildRoutes {
.map(guild -> resolveMember(guild, userId)
.thenApply(member -> Optional.ofNullable(member)
.map(m -> userGuildEntry(guild, m, guildServices.get(guild.getId()))))
.exceptionally(error -> Optional.<Map<String, Object>>empty()))
.exceptionally(_ -> Optional.empty()))
.toList();
ctx.future(() -> CompletableFuture.allOf(lookups.toArray(new CompletableFuture[0])).thenApply(ignored -> {
@@ -198,7 +198,7 @@ public final class GuildRoutes {
private static void ownerOf(Supplier<JDA> jdaSupplier, Context ctx) {
Guild guild = guild(jdaSupplier, ctx);
CacheOrFetch.<Member>resolve(
CacheOrFetch.resolve(
ctx,
guild::getOwner,
guild::retrieveOwner,
@@ -263,7 +263,7 @@ public final class GuildRoutes {
Guild guild = guild(jdaSupplier, ctx);
String userId = ctx.pathParam("userId");
CacheOrFetch.<Member>resolve(
CacheOrFetch.resolve(
ctx,
() -> guild.getMemberById(userId),
() -> guild.retrieveMemberById(userId),
@@ -289,7 +289,7 @@ public final class GuildRoutes {
Guild guild = guild(jdaSupplier, ctx);
String userId = ctx.pathParam("userId");
CacheOrFetch.<Member>resolve(
CacheOrFetch.resolve(
ctx,
() -> guild.getMemberById(userId),
() -> guild.retrieveMemberById(userId),
@@ -315,7 +315,7 @@ public final class GuildRoutes {
Guild guild = guild(jdaSupplier, ctx);
String userId = ctx.pathParam("userId");
CacheOrFetch.<Member>resolve(
CacheOrFetch.resolve(
ctx,
() -> guild.getMemberById(userId),
() -> guild.retrieveMemberById(userId),
@@ -377,7 +377,7 @@ public final class MusicRoutes {
MusicManager manager = musicService.get(guild);
String userId = ctx.pathParam("userId");
CacheOrFetch.<Member>resolve(
CacheOrFetch.resolve(
ctx,
() -> guild.getMemberById(userId),
() -> guild.retrieveMemberById(userId),
@@ -506,7 +506,7 @@ public final class MusicRoutes {
summary = "Clear the queue, or remove a single track from it when a position is provided",
tags = {"Music"},
pathParams = @OpenApiParam(name = "guildId", description = "The Discord guild id"),
queryParams = @OpenApiParam(name = "position", description = "1-based position of the track to remove (position 1 is the currently playing track); omit to clear the whole queue", required = false),
queryParams = @OpenApiParam(name = "position", description = "1-based position of the track to remove (position 1 is the currently playing track); omit to clear the whole queue"),
responses = {
@OpenApiResponse(status = "200", content = @OpenApiContent(from = DeleteQueueResponse.class)),
@OpenApiResponse(status = "400", content = @OpenApiContent(from = ErrorResponse.class)),
@@ -66,7 +66,7 @@ public class WebApi implements Lifecycle {
config.startup.showJavalinBanner = false;
config.registerPlugin(new OpenApiPlugin(pluginConfig -> pluginConfig.withDefinitionConfiguration(
(version, definition) -> definition
(_, definition) -> definition
.info(info -> info.title("Net Neutrality API"))
.withApiKeyAuth("ApiKeyAuth", "X-API-Key")
.withGlobalSecurity("ApiKeyAuth")