From e5136944e83947eb8a5381a37de4788f1bb196bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Spie=C3=9F?= Date: Mon, 3 Jul 2023 16:43:55 +0200 Subject: [PATCH] Add missing javadocs (#2491) * Add missing package-info files * Add some more missing package infos * Add overview * Cleanup * Add docs for AudioChannelManager * Add missing channel event docs * Add docs to ContextConsumer * Add docs to GenericEvent * Add exception docs * Add missing manager docs * Add docs to utils * Add docs to ListenerProxy * Add some docs to request classes * Add docs to WebhookType enum * Update examples * Update some docs marked as todo * Fix copy-paste issues --- build.gradle.kts | 2 + overview.html | 43 +++++++++++++++++++ src/examples/java/MessageLoggerExample.java | 2 +- src/examples/java/SlashBotExample.java | 4 +- src/main/java/net/dv8tion/jda/api/JDA.java | 2 +- .../java/net/dv8tion/jda/api/JDABuilder.java | 2 +- .../net/dv8tion/jda/api/audio/OpusPacket.java | 2 +- .../api/audio/hooks/ConnectionListener.java | 2 + .../jda/api/audio/hooks/ListenerProxy.java | 3 ++ .../net/dv8tion/jda/api/entities/Invite.java | 2 +- .../jda/api/entities/MessageHistory.java | 1 - .../dv8tion/jda/api/entities/MessageType.java | 2 +- .../dv8tion/jda/api/entities/WebhookType.java | 3 ++ .../entities/automod/build/package-info.java | 20 +++++++++ .../api/entities/automod/package-info.java | 20 +++++++++ .../jda/api/entities/channel/Channel.java | 1 - .../attribute/ICategorizableChannel.java | 4 +- .../channel/attribute/ICopyableChannel.java | 2 +- .../channel/attribute/IInviteContainer.java | 2 +- .../channel/attribute/IMemberContainer.java | 4 +- .../attribute/IPermissionContainer.java | 2 +- .../attribute/IPositionableChannel.java | 4 +- .../channel/attribute/IWebhookContainer.java | 2 +- .../channel/attribute/package-info.java | 20 +++++++++ .../channel/concrete/NewsChannel.java | 6 +-- .../channel/concrete/PrivateChannel.java | 6 +-- .../channel/concrete/package-info.java | 20 +++++++++ .../entities/channel/forums/package-info.java | 20 +++++++++ .../channel/middleman/AudioChannel.java | 1 - .../channel/middleman/GuildChannel.java | 8 +++- .../middleman/GuildMessageChannel.java | 2 +- .../channel/middleman/package-info.java | 20 +++++++++ .../api/entities/channel/package-info.java | 20 +++++++++ .../entities/channel/unions/ChannelUnion.java | 30 ++++++------- .../unions/DefaultGuildChannelUnion.java | 8 ++-- .../channel/unions/GuildChannelUnion.java | 24 +++++------ .../unions/GuildMessageChannelUnion.java | 18 ++++---- .../unions/IPermissionContainerUnion.java | 22 +++++----- .../channel/unions/IThreadContainerUnion.java | 12 +++--- .../unions/IWebhookContainerUnion.java | 20 ++++----- .../channel/unions/MessageChannelUnion.java | 18 ++++---- .../entities/channel/unions/package-info.java | 20 +++++++++ .../jda/api/entities/emoji/package-info.java | 20 +++++++++ .../api/entities/sticker/package-info.java | 20 +++++++++ .../api/entities/templates/package-info.java | 20 +++++++++ .../dv8tion/jda/api/events/GenericEvent.java | 5 +++ .../jda/api/events/automod/package-info.java | 20 +++++++++ .../events/channel/ChannelCreateEvent.java | 4 +- .../events/channel/ChannelDeleteEvent.java | 4 +- .../channel/forum/ForumTagAddEvent.java | 3 ++ .../channel/forum/ForumTagRemoveEvent.java | 3 ++ .../events/channel/forum/package-info.java | 26 +++++++++++ .../channel/forum/update/package-info.java | 20 +++++++++ .../events/channel/update/package-info.java | 20 +++++++++ .../api/events/guild/invite/package-info.java | 25 +++++++++++ .../guild/member/update/package-info.java | 31 +++++++++++++ .../events/guild/override/package-info.java | 20 +++++++++ .../GenericScheduledEventUserEvent.java | 6 +-- .../ScheduledEventCreateEvent.java | 4 +- .../ScheduledEventDeleteEvent.java | 4 +- .../ScheduledEventUserAddEvent.java | 6 +-- .../ScheduledEventUserRemoveEvent.java | 6 +-- .../GenericScheduledEventUpdateEvent.java | 2 +- .../ScheduledEventUpdateDescriptionEvent.java | 2 +- .../ScheduledEventUpdateEndTimeEvent.java | 2 +- .../ScheduledEventUpdateImageEvent.java | 2 +- .../ScheduledEventUpdateLocationEvent.java | 2 +- .../update/ScheduledEventUpdateNameEvent.java | 2 +- .../ScheduledEventUpdateStartTimeEvent.java | 2 +- .../ScheduledEventUpdateStatusEvent.java | 2 +- .../scheduledevent/update/package-info.java | 30 +++++++++++++ .../jda/api/events/http/package-info.java | 20 +++++++++ .../command/GenericPrivilegeUpdateEvent.java | 8 ++-- .../interaction/command/package-info.java | 20 +++++++++ .../interaction/component/package-info.java | 20 +++++++++ .../api/events/interaction/package-info.java | 22 ++++++++++ .../jda/api/events/stage/package-info.java | 20 +++++++++ .../api/events/stage/update/package-info.java | 20 +++++++++ .../events/thread/member/package-info.java | 20 +++++++++ .../jda/api/events/thread/package-info.java | 20 +++++++++ .../api/events/user/update/package-info.java | 20 +++++++++ .../jda/api/exceptions/ContextException.java | 3 ++ .../api/exceptions/HierarchyException.java | 6 +++ .../jda/api/exceptions/HttpException.java | 3 ++ .../api/exceptions/InvalidTokenException.java | 9 ++-- .../jda/api/exceptions/ParsingException.java | 6 +++ .../interactions/callbacks/package-info.java | 20 +++++++++ .../commands/build/package-info.java | 20 +++++++++ .../commands/context/package-info.java | 20 +++++++++ .../commands/localization/package-info.java | 20 +++++++++ .../interactions/commands/package-info.java | 20 +++++++++ .../commands/privileges/package-info.java | 22 ++++++++++ .../interactions/components/Component.java | 1 - .../components/buttons/package-info.java | 20 +++++++++ .../interactions/components/package-info.java | 20 +++++++++ .../components/selections/package-info.java | 20 +++++++++ .../components/text/TextInput.java | 12 +++--- .../components/text/package-info.java | 20 +++++++++ .../api/interactions/modals/package-info.java | 20 +++++++++ .../jda/api/interactions/package-info.java | 20 +++++++++ .../net/dv8tion/jda/api/managers/Manager.java | 5 +++ .../jda/api/managers/ThreadManager.java | 5 --- .../IAgeRestrictedChannelManager.java | 6 +++ .../ICategorizableChannelManager.java | 7 ++- .../IPermissionContainerManager.java | 7 ++- .../IPositionableChannelManager.java | 6 +++ .../attribute/ISlowmodeChannelManager.java | 1 - .../channel/attribute/package-info.java | 20 +++++++++ .../concrete/ThreadChannelManager.java | 8 ++-- .../channel/concrete/VoiceChannelManager.java | 11 ++++- .../channel/concrete/package-info.java | 20 +++++++++ .../middleman/AudioChannelManager.java | 21 ++++++++- .../channel/middleman/package-info.java | 20 +++++++++ .../api/managers/channel/package-info.java | 20 +++++++++ .../net/dv8tion/jda/api/requests/Request.java | 5 +++ .../dv8tion/jda/api/requests/Response.java | 3 ++ .../dv8tion/jda/api/requests/RestAction.java | 1 - .../dv8tion/jda/api/requests/RestFuture.java | 5 +++ .../restaction/ThreadChannelAction.java | 10 ++++- .../restaction/interactions/package-info.java | 20 +++++++++ .../ThreadChannelPaginationAction.java | 7 ++- .../sharding/DefaultShardManagerBuilder.java | 2 +- .../jda/api/sharding/ShardManager.java | 3 +- .../dv8tion/jda/api/utils/IOBiConsumer.java | 6 +++ .../net/dv8tion/jda/api/utils/IOConsumer.java | 5 +++ .../net/dv8tion/jda/api/utils/IOFunction.java | 6 +++ .../dv8tion/jda/api/utils/MarkdownUtil.java | 3 ++ .../net/dv8tion/jda/api/utils/MiscUtil.java | 9 ++-- .../net/dv8tion/jda/api/utils/Procedure.java | 5 +++ .../api/utils/SessionControllerAdapter.java | 5 +++ .../net/dv8tion/jda/api/utils/TimeUtil.java | 3 ++ .../jda/api/utils/messages/package-info.java | 20 +++++++++ 132 files changed, 1317 insertions(+), 169 deletions(-) create mode 100644 overview.html create mode 100644 src/main/java/net/dv8tion/jda/api/entities/automod/build/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/entities/automod/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/entities/channel/attribute/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/entities/channel/concrete/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/entities/channel/forums/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/entities/channel/middleman/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/entities/channel/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/entities/channel/unions/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/entities/emoji/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/entities/sticker/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/entities/templates/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/automod/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/channel/forum/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/channel/forum/update/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/channel/update/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/guild/invite/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/guild/member/update/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/guild/override/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/http/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/interaction/command/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/interaction/component/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/interaction/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/stage/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/stage/update/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/thread/member/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/thread/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/events/user/update/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/interactions/callbacks/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/interactions/commands/build/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/interactions/commands/context/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/interactions/commands/localization/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/interactions/commands/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/interactions/commands/privileges/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/interactions/components/buttons/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/interactions/components/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/interactions/components/selections/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/interactions/components/text/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/interactions/modals/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/interactions/package-info.java delete mode 100644 src/main/java/net/dv8tion/jda/api/managers/ThreadManager.java create mode 100644 src/main/java/net/dv8tion/jda/api/managers/channel/attribute/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/managers/channel/concrete/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/managers/channel/middleman/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/managers/channel/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/requests/restaction/interactions/package-info.java create mode 100644 src/main/java/net/dv8tion/jda/api/utils/messages/package-info.java diff --git a/build.gradle.kts b/build.gradle.kts index 9914536947..1067728eb8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -282,6 +282,8 @@ javadoc.apply { } else { opt.addBooleanOption("Xdoclint:all,-missing,-accessibility", true) } + + opt.overview = "$projectDir/overview.html" } dependsOn(sourcesJar) diff --git a/overview.html b/overview.html new file mode 100644 index 0000000000..2daea33224 --- /dev/null +++ b/overview.html @@ -0,0 +1,43 @@ + + + +

Welcome to the documentation of the Java Discord API (JDA) library!

+

If you are new to JDA, you can check some of our official guides to get started: + +

+ +

There are also a few examples available to get inspired: +

+ +

Other useful resources: +

+ diff --git a/src/examples/java/MessageLoggerExample.java b/src/examples/java/MessageLoggerExample.java index 178723a2af..a773635655 100644 --- a/src/examples/java/MessageLoggerExample.java +++ b/src/examples/java/MessageLoggerExample.java @@ -145,7 +145,7 @@ public void onMessageReceived(@Nonnull MessageReceivedEvent event) System.out.printf("[%s] [%#s] %#s: %s\n", event.getGuild().getName(), // The name of the server the user sent the message in, this is generally referred to as "guild" in the API channel, // The %#s makes use of the channel name and displays as something like #general - author, // The %#s makes use of User#getAsTag which results in something like Minn#6688 + author, // The %#s makes use of User#getAsTag which results in something like minn or Minn#1337 message.getContentDisplay() // This removes any unwanted mention syntax and converts it to a readable string ); } diff --git a/src/examples/java/SlashBotExample.java b/src/examples/java/SlashBotExample.java index 15253b3e2d..0b993c758c 100644 --- a/src/examples/java/SlashBotExample.java +++ b/src/examples/java/SlashBotExample.java @@ -167,13 +167,13 @@ public void ban(SlashCommandInteractionEvent event, User user, Member member) // optional ban reason with a lazy evaluated fallback (supplier) String reason = event.getOption("reason", - () -> "Banned by " + event.getUser().getAsTag(), // used if getOption("reason") is null (not provided) + () -> "Banned by " + event.getUser().getName(), // used if getOption("reason") is null (not provided) OptionMapping::getAsString); // used if getOption("reason") is not null (provided) // Ban the user and send a success response event.getGuild().ban(user, delDays, TimeUnit.DAYS) .reason(reason) // audit-log ban reason (sets X-AuditLog-Reason header) - .flatMap(v -> hook.sendMessage("Banned user " + user.getAsTag())) // chain a followup message after the ban is executed + .flatMap(v -> hook.sendMessage("Banned user " + user.getName())) // chain a followup message after the ban is executed .queue(); // execute the entire call chain } diff --git a/src/main/java/net/dv8tion/jda/api/JDA.java b/src/main/java/net/dv8tion/jda/api/JDA.java index 09895a04ce..7251566654 100644 --- a/src/main/java/net/dv8tion/jda/api/JDA.java +++ b/src/main/java/net/dv8tion/jda/api/JDA.java @@ -574,7 +574,7 @@ default boolean awaitShutdown() throws InterruptedException * This uses the {@link net.dv8tion.jda.api.hooks.InterfacedEventManager InterfacedEventListener} by default. * To switch to the {@link net.dv8tion.jda.api.hooks.AnnotatedEventManager AnnotatedEventManager}, use {@link #setEventManager(IEventManager)}. * - * Note: when using the {@link net.dv8tion.jda.api.hooks.InterfacedEventManager InterfacedEventListener} (default), + *

Note: when using the {@link net.dv8tion.jda.api.hooks.InterfacedEventManager InterfacedEventListener} (default), * given listener must be instance of {@link net.dv8tion.jda.api.hooks.EventListener EventListener}! * * @param listeners diff --git a/src/main/java/net/dv8tion/jda/api/JDABuilder.java b/src/main/java/net/dv8tion/jda/api/JDABuilder.java index 690eac4d27..fea73990d1 100644 --- a/src/main/java/net/dv8tion/jda/api/JDABuilder.java +++ b/src/main/java/net/dv8tion/jda/api/JDABuilder.java @@ -1187,7 +1187,7 @@ public JDABuilder setEnableShutdownHook(boolean enable) * Sets whether or not JDA should try to reconnect if a connection-error is encountered. *
This will use an incremental reconnect (timeouts are increased each time an attempt fails). * - * Default: true (enabled) + *

Default: true (enabled) * * @param autoReconnect * If true - enables autoReconnect diff --git a/src/main/java/net/dv8tion/jda/api/audio/OpusPacket.java b/src/main/java/net/dv8tion/jda/api/audio/OpusPacket.java index 16bf5a52c8..4644000b82 100644 --- a/src/main/java/net/dv8tion/jda/api/audio/OpusPacket.java +++ b/src/main/java/net/dv8tion/jda/api/audio/OpusPacket.java @@ -136,7 +136,7 @@ public byte[] getOpusAudio() *
This method is idempotent and will provide the same result on multiple calls * without decoding again. * - * For most use-cases {@link #getAudioData(double)} should be used instead. + *

For most use-cases {@link #getAudioData(double)} should be used instead. * * @throws java.lang.IllegalStateException * If {@link #canDecode()} is false diff --git a/src/main/java/net/dv8tion/jda/api/audio/hooks/ConnectionListener.java b/src/main/java/net/dv8tion/jda/api/audio/hooks/ConnectionListener.java index 22cfcf11c3..14521e811f 100644 --- a/src/main/java/net/dv8tion/jda/api/audio/hooks/ConnectionListener.java +++ b/src/main/java/net/dv8tion/jda/api/audio/hooks/ConnectionListener.java @@ -46,6 +46,8 @@ public interface ConnectionListener */ void onStatusChange(@Nonnull ConnectionStatus status); + // TODO: Deprecate and replace these onUserSpeaking methods. + /** * This method is an easy way to detect if a user is talking. Discord sends us an event when a user starts or stops * talking and it is parallel to the audio socket, so this event could come milliseconds before or after audio begins diff --git a/src/main/java/net/dv8tion/jda/api/audio/hooks/ListenerProxy.java b/src/main/java/net/dv8tion/jda/api/audio/hooks/ListenerProxy.java index ee8528cbf1..f6c9417783 100644 --- a/src/main/java/net/dv8tion/jda/api/audio/hooks/ListenerProxy.java +++ b/src/main/java/net/dv8tion/jda/api/audio/hooks/ListenerProxy.java @@ -24,6 +24,9 @@ import javax.annotation.Nonnull; import java.util.EnumSet; +/** + * Internal implementation of {@link ConnectionListener}, to handle possible exceptions thrown by user code. + */ public class ListenerProxy implements ConnectionListener { private static final Logger log = LoggerFactory.getLogger(ListenerProxy.class); diff --git a/src/main/java/net/dv8tion/jda/api/entities/Invite.java b/src/main/java/net/dv8tion/jda/api/entities/Invite.java index f2cae6590f..2e122aa8d4 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/Invite.java +++ b/src/main/java/net/dv8tion/jda/api/entities/Invite.java @@ -696,7 +696,7 @@ enum InviteType * A TargetType indicates additional action to be taken by the client on accepting the invite, * typically connecting external services or launching external applications depending on the specific TargetType. * - * Some actions might not be available or show up on certain devices. + *

Some actions might not be available or show up on certain devices. * * @see InviteTarget#getType() */ diff --git a/src/main/java/net/dv8tion/jda/api/entities/MessageHistory.java b/src/main/java/net/dv8tion/jda/api/entities/MessageHistory.java index d6ada27629..9f09d35e90 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/MessageHistory.java +++ b/src/main/java/net/dv8tion/jda/api/entities/MessageHistory.java @@ -253,7 +253,6 @@ public RestAction> retrievePast(int amount) * @throws java.lang.IllegalStateException * If no messages have been retrieved by this MessageHistory. * - * * @return {@link net.dv8tion.jda.api.requests.RestAction RestAction} - * Type: {@link java.util.List List}{@literal <}{@link net.dv8tion.jda.api.entities.Message Message}{@literal >} *
Retrieved Messages are placed in a List and provided in order of most recent to oldest with most recent diff --git a/src/main/java/net/dv8tion/jda/api/entities/MessageType.java b/src/main/java/net/dv8tion/jda/api/entities/MessageType.java index f0c8e952f3..5e6bafc415 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/MessageType.java +++ b/src/main/java/net/dv8tion/jda/api/entities/MessageType.java @@ -148,7 +148,7 @@ public enum MessageType /** * This message was created by the automod system. * - * Messages from this type usually come with custom embeds containing relevant information, the author is the user that triggered the filter. + *

Messages from this type usually come with custom embeds containing relevant information, the author is the user that triggered the filter. */ AUTO_MODERATION_ACTION(24, true, true), diff --git a/src/main/java/net/dv8tion/jda/api/entities/WebhookType.java b/src/main/java/net/dv8tion/jda/api/entities/WebhookType.java index 092b87e104..fdf97c3d9b 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/WebhookType.java +++ b/src/main/java/net/dv8tion/jda/api/entities/WebhookType.java @@ -18,6 +18,9 @@ import javax.annotation.Nonnull; +/** + * Types of webhooks. + */ public enum WebhookType { /** Placeholder for unsupported types */ diff --git a/src/main/java/net/dv8tion/jda/api/entities/automod/build/package-info.java b/src/main/java/net/dv8tion/jda/api/entities/automod/build/package-info.java new file mode 100644 index 0000000000..21019aebda --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/entities/automod/build/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Configurations for AutoMod rules and triggers. + */ +package net.dv8tion.jda.api.entities.automod.build; diff --git a/src/main/java/net/dv8tion/jda/api/entities/automod/package-info.java b/src/main/java/net/dv8tion/jda/api/entities/automod/package-info.java new file mode 100644 index 0000000000..d5ea6fd3aa --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/entities/automod/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Types and enums related to AutoMod. + */ +package net.dv8tion.jda.api.entities.automod; diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/Channel.java b/src/main/java/net/dv8tion/jda/api/entities/channel/Channel.java index b3101cc2fa..9a28d43dad 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/channel/Channel.java +++ b/src/main/java/net/dv8tion/jda/api/entities/channel/Channel.java @@ -74,7 +74,6 @@ default EnumSet getFlags() JDA getJDA(); /** - * TODO-v5: Revisit these docs * Deletes this Channel. * *

Possible ErrorResponses include: diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/ICategorizableChannel.java b/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/ICategorizableChannel.java index a78a794064..d10fc50645 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/ICategorizableChannel.java +++ b/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/ICategorizableChannel.java @@ -41,7 +41,7 @@ public interface ICategorizableChannel extends GuildChannel, IPermissionContaine /** * Get the snowflake of the {@link Category} that contains this channel. * - * This will return {@code 0} if this channel doesn't have a parent category. + *

This will return {@code 0} if this channel doesn't have a parent category. * * @return The Discord ID snowflake of the parent channel as a long. */ @@ -50,7 +50,7 @@ public interface ICategorizableChannel extends GuildChannel, IPermissionContaine /** * Get the snowflake of the {@link Category Category} that contains this channel. * - * This will return {@code null} if this channel doesn't have a parent category. + *

This will return {@code null} if this channel doesn't have a parent category. * * @return Possibly-null String representation of the Discord ID snowflake of the parent channel. */ diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/ICopyableChannel.java b/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/ICopyableChannel.java index 85bf31f5b3..a39f413bb4 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/ICopyableChannel.java +++ b/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/ICopyableChannel.java @@ -27,7 +27,7 @@ /** * Represents a GuildChannel that is capable of being copied. * - * Please see {@link ICopyableChannel#createCopy()} for information on what is copied. + *

Please see {@link ICopyableChannel#createCopy()} for information on what is copied. */ public interface ICopyableChannel extends GuildChannel { diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/IInviteContainer.java b/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/IInviteContainer.java index 8d11913f82..16594def62 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/IInviteContainer.java +++ b/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/IInviteContainer.java @@ -29,7 +29,7 @@ /** * Represents a {@link GuildChannel GuildChannel} that can be the target of a Guild's invite. * - * Invites have to be targeted at exactly one {@link IInviteContainer}, which will open when the invite is used (unless restricted by permissions). + *

Invites have to be targeted at exactly one {@link IInviteContainer}, which will open when the invite is used (unless restricted by permissions). */ public interface IInviteContainer extends GuildChannel { diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/IMemberContainer.java b/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/IMemberContainer.java index 987221c141..37c7a57863 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/IMemberContainer.java +++ b/src/main/java/net/dv8tion/jda/api/entities/channel/attribute/IMemberContainer.java @@ -28,9 +28,9 @@ /** * Represents a {@link GuildChannel} that is capable of containing members. * - * Implementations interpret this meaning as best applies to them: + *

Implementations interpret this meaning as best applies to them: * - * For example, + *

For example, *

* - * Note: This is effectively equivalent to using the cast operator: + *

Note: This is effectively equivalent to using the cast operator: *


      * //These are the same!
      * GuildMessageChannel channel = union.asGuildMessageChannel();
@@ -141,7 +141,7 @@ public interface IThreadContainerUnion extends IThreadContainer
      *     
  • {@link NewsChannel}
  • * * - * Note: This is effectively equivalent to using the cast operator: + *

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * StandardGuildChannel channel = union.asStandardGuildChannel();
    @@ -164,7 +164,7 @@ public interface IThreadContainerUnion extends IThreadContainer
          *     
  • {@link NewsChannel}
  • * * - * Note: This is effectively equivalent to using the cast operator: + *

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * StandardGuildMessageChannel channel = union.asStandardGuildMessageChannel();
    diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/unions/IWebhookContainerUnion.java b/src/main/java/net/dv8tion/jda/api/entities/channel/unions/IWebhookContainerUnion.java
    index 2a6e92b6e9..8a4d23c1a9 100644
    --- a/src/main/java/net/dv8tion/jda/api/entities/channel/unions/IWebhookContainerUnion.java
    +++ b/src/main/java/net/dv8tion/jda/api/entities/channel/unions/IWebhookContainerUnion.java
    @@ -47,7 +47,7 @@ public interface IWebhookContainerUnion extends IWebhookContainer
          * Casts this union to a {@link TextChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * TextChannel channel = union.asTextChannel();
    @@ -69,7 +69,7 @@ public interface IWebhookContainerUnion extends IWebhookContainer
          * Casts this union to a {@link NewsChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * NewsChannel channel = union.asNewsChannel();
    @@ -91,7 +91,7 @@ public interface IWebhookContainerUnion extends IWebhookContainer
          * Casts this union to a {@link ForumChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * ForumChannel channel = union.asForumChannel();
    @@ -113,7 +113,7 @@ public interface IWebhookContainerUnion extends IWebhookContainer
          * Casts this union to a {@link net.dv8tion.jda.api.entities.channel.attribute.IThreadContainer}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * IThreadContainer channel = union.asThreadContainer();
    @@ -134,7 +134,7 @@ public interface IWebhookContainerUnion extends IWebhookContainer
          * Casts this union to a {@link VoiceChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * VoiceChannel channel = union.asVoiceChannel();
    @@ -156,7 +156,7 @@ public interface IWebhookContainerUnion extends IWebhookContainer
          * Casts this union to a {@link StageChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * StageChannel channel = union.asStageChannel();
    @@ -182,7 +182,7 @@ public interface IWebhookContainerUnion extends IWebhookContainer
          *     
  • {@link NewsChannel}
  • * * - * Note: This is effectively equivalent to using the cast operator: + *

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * GuildMessageChannel channel = union.asGuildMessageChannel();
    @@ -204,7 +204,7 @@ public interface IWebhookContainerUnion extends IWebhookContainer
          * Casts this union to a {@link StandardGuildChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * StandardGuildChannel channel = union.asStandardGuildChannel();
    @@ -223,7 +223,7 @@ public interface IWebhookContainerUnion extends IWebhookContainer
          * Casts this union to a {@link StandardGuildMessageChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * StandardGuildMessageChannel channel = union.asStandardGuildMessageChannel();
    @@ -242,7 +242,7 @@ public interface IWebhookContainerUnion extends IWebhookContainer
          * Casts this union to a {@link AudioChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * AudioChannel channel = union.asAudioChannel();
    diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/unions/MessageChannelUnion.java b/src/main/java/net/dv8tion/jda/api/entities/channel/unions/MessageChannelUnion.java
    index d559b038c8..e9148d18b1 100644
    --- a/src/main/java/net/dv8tion/jda/api/entities/channel/unions/MessageChannelUnion.java
    +++ b/src/main/java/net/dv8tion/jda/api/entities/channel/unions/MessageChannelUnion.java
    @@ -46,7 +46,7 @@ public interface MessageChannelUnion extends MessageChannel
          * Casts this union to a {@link PrivateChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * PrivateChannel channel = union.asPrivateChannel();
    @@ -68,7 +68,7 @@ public interface MessageChannelUnion extends MessageChannel
          * Casts this union to a {@link TextChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * TextChannel channel = union.asTextChannel();
    @@ -90,7 +90,7 @@ public interface MessageChannelUnion extends MessageChannel
          * Casts this union to a {@link NewsChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * NewsChannel channel = union.asNewsChannel();
    @@ -112,7 +112,7 @@ public interface MessageChannelUnion extends MessageChannel
          * Casts this union to a {@link ThreadChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * ThreadChannel channel = union.asThreadChannel();
    @@ -134,7 +134,7 @@ public interface MessageChannelUnion extends MessageChannel
          * Casts this union to a {@link VoiceChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * VoiceChannel channel = union.asVoiceChannel();
    @@ -156,7 +156,7 @@ public interface MessageChannelUnion extends MessageChannel
          * Casts this union to a {@link StageChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * StageChannel channel = union.asStageChannel();
    @@ -178,7 +178,7 @@ public interface MessageChannelUnion extends MessageChannel
          * Casts this union to a {@link net.dv8tion.jda.api.entities.channel.attribute.IThreadContainer}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * IThreadContainer channel = union.asThreadContainer();
    @@ -204,7 +204,7 @@ public interface MessageChannelUnion extends MessageChannel
          *     
  • {@link ThreadChannel}
  • * * - * Note: This is effectively equivalent to using the cast operator: + *

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * GuildMessageChannel channel = union.asGuildMessageChannel();
    @@ -226,7 +226,7 @@ public interface MessageChannelUnion extends MessageChannel
          * Casts this union to a {@link AudioChannel}.
          * This method exists for developer discoverability.
          *
    -     * Note: This is effectively equivalent to using the cast operator:
    +     * 

    Note: This is effectively equivalent to using the cast operator: *

    
          * //These are the same!
          * AudioChannel channel = union.asAudioChannel();
    diff --git a/src/main/java/net/dv8tion/jda/api/entities/channel/unions/package-info.java b/src/main/java/net/dv8tion/jda/api/entities/channel/unions/package-info.java
    new file mode 100644
    index 0000000000..124ac2dbf0
    --- /dev/null
    +++ b/src/main/java/net/dv8tion/jda/api/entities/channel/unions/package-info.java
    @@ -0,0 +1,20 @@
    +/*
    + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +/**
    + * Union types used for simple casting to more concrete types.
    + */
    +package net.dv8tion.jda.api.entities.channel.unions;
    diff --git a/src/main/java/net/dv8tion/jda/api/entities/emoji/package-info.java b/src/main/java/net/dv8tion/jda/api/entities/emoji/package-info.java
    new file mode 100644
    index 0000000000..28a6eb4614
    --- /dev/null
    +++ b/src/main/java/net/dv8tion/jda/api/entities/emoji/package-info.java
    @@ -0,0 +1,20 @@
    +/*
    + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +/**
    + * Types relating to unicode and custom emoji as used in the API.
    + */
    +package net.dv8tion.jda.api.entities.emoji;
    diff --git a/src/main/java/net/dv8tion/jda/api/entities/sticker/package-info.java b/src/main/java/net/dv8tion/jda/api/entities/sticker/package-info.java
    new file mode 100644
    index 0000000000..e37a9d9b3d
    --- /dev/null
    +++ b/src/main/java/net/dv8tion/jda/api/entities/sticker/package-info.java
    @@ -0,0 +1,20 @@
    +/*
    + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +/**
    + * Types relevant for custom guild stickers and nitro stickers.
    + */
    +package net.dv8tion.jda.api.entities.sticker;
    diff --git a/src/main/java/net/dv8tion/jda/api/entities/templates/package-info.java b/src/main/java/net/dv8tion/jda/api/entities/templates/package-info.java
    new file mode 100644
    index 0000000000..6d61ffc953
    --- /dev/null
    +++ b/src/main/java/net/dv8tion/jda/api/entities/templates/package-info.java
    @@ -0,0 +1,20 @@
    +/*
    + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +/**
    + * Types relevant for guild templates.
    + */
    +package net.dv8tion.jda.api.entities.templates;
    diff --git a/src/main/java/net/dv8tion/jda/api/events/GenericEvent.java b/src/main/java/net/dv8tion/jda/api/events/GenericEvent.java
    index d510e5b5ac..d671cd0650 100644
    --- a/src/main/java/net/dv8tion/jda/api/events/GenericEvent.java
    +++ b/src/main/java/net/dv8tion/jda/api/events/GenericEvent.java
    @@ -22,6 +22,11 @@
     import javax.annotation.Nonnull;
     import javax.annotation.Nullable;
     
    +/**
    + * Interface for events supported by {@link net.dv8tion.jda.api.hooks.IEventManager EventManagers}.
    + *
    + * @see net.dv8tion.jda.api.hooks.EventListener#onEvent(GenericEvent)
    + */
     public interface GenericEvent
     {
         /**
    diff --git a/src/main/java/net/dv8tion/jda/api/events/automod/package-info.java b/src/main/java/net/dv8tion/jda/api/events/automod/package-info.java
    new file mode 100644
    index 0000000000..f36d101911
    --- /dev/null
    +++ b/src/main/java/net/dv8tion/jda/api/events/automod/package-info.java
    @@ -0,0 +1,20 @@
    +/*
    + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +/**
    + * Events related to the configuration of AutoMod rules or AutoMod rules being triggered.
    + */
    +package net.dv8tion.jda.api.events.automod;
    diff --git a/src/main/java/net/dv8tion/jda/api/events/channel/ChannelCreateEvent.java b/src/main/java/net/dv8tion/jda/api/events/channel/ChannelCreateEvent.java
    index 6f0efdfe73..d3d9b0c313 100644
    --- a/src/main/java/net/dv8tion/jda/api/events/channel/ChannelCreateEvent.java
    +++ b/src/main/java/net/dv8tion/jda/api/events/channel/ChannelCreateEvent.java
    @@ -21,7 +21,9 @@
     
     import javax.annotation.Nonnull;
     
    -//TODO-v5: Docs
    +/**
    + * Indicates that a {@link Channel} was created.
    + */
     public class ChannelCreateEvent extends GenericChannelEvent
     {
         public ChannelCreateEvent(@Nonnull JDA api, long responseNumber, Channel channel)
    diff --git a/src/main/java/net/dv8tion/jda/api/events/channel/ChannelDeleteEvent.java b/src/main/java/net/dv8tion/jda/api/events/channel/ChannelDeleteEvent.java
    index b8211025c9..2cec9935f9 100644
    --- a/src/main/java/net/dv8tion/jda/api/events/channel/ChannelDeleteEvent.java
    +++ b/src/main/java/net/dv8tion/jda/api/events/channel/ChannelDeleteEvent.java
    @@ -21,7 +21,9 @@
     
     import javax.annotation.Nonnull;
     
    -//TODO-v5: Docs
    +/**
    + * Indicates that a {@link Channel} was deleted.
    + */
     public class ChannelDeleteEvent extends GenericChannelEvent
     {
         public ChannelDeleteEvent(@Nonnull JDA api, long responseNumber, Channel channel)
    diff --git a/src/main/java/net/dv8tion/jda/api/events/channel/forum/ForumTagAddEvent.java b/src/main/java/net/dv8tion/jda/api/events/channel/forum/ForumTagAddEvent.java
    index d171be2f0e..9f1129304d 100644
    --- a/src/main/java/net/dv8tion/jda/api/events/channel/forum/ForumTagAddEvent.java
    +++ b/src/main/java/net/dv8tion/jda/api/events/channel/forum/ForumTagAddEvent.java
    @@ -26,6 +26,9 @@
     /**
      * Indicates that a new {@link ForumTag} was added to a {@link ForumChannel}.
      *
    + * 

    Use {@link net.dv8tion.jda.api.events.channel.update.ChannelUpdateAppliedTagsEvent ChannelUpdateAppliedTagsEvent} + * to detect when a tag is added to a forum post instead. + * *

    Requirements
    * This requires {@link net.dv8tion.jda.api.utils.cache.CacheFlag#FORUM_TAGS CacheFlag.FORUM_TAGS} to be enabled. * {@link net.dv8tion.jda.api.JDABuilder#createLight(String, Collection) JDABuilder.createLight(...)} disables this by default. diff --git a/src/main/java/net/dv8tion/jda/api/events/channel/forum/ForumTagRemoveEvent.java b/src/main/java/net/dv8tion/jda/api/events/channel/forum/ForumTagRemoveEvent.java index 10f49db772..8237153aa1 100644 --- a/src/main/java/net/dv8tion/jda/api/events/channel/forum/ForumTagRemoveEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/channel/forum/ForumTagRemoveEvent.java @@ -26,6 +26,9 @@ /** * Indicates that a {@link ForumTag} was removed from a {@link ForumChannel}. * + *

    Use {@link net.dv8tion.jda.api.events.channel.update.ChannelUpdateAppliedTagsEvent ChannelUpdateAppliedTagsEvent} + * to detect when a tag is removed from a forum post instead. + * *

    Requirements
    * This requires {@link net.dv8tion.jda.api.utils.cache.CacheFlag#FORUM_TAGS CacheFlag.FORUM_TAGS} to be enabled. * {@link net.dv8tion.jda.api.JDABuilder#createLight(String, Collection) JDABuilder.createLight(...)} disables this by default. diff --git a/src/main/java/net/dv8tion/jda/api/events/channel/forum/package-info.java b/src/main/java/net/dv8tion/jda/api/events/channel/forum/package-info.java new file mode 100644 index 0000000000..3931c31f34 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/channel/forum/package-info.java @@ -0,0 +1,26 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Events related to forum tags. + * + *

    Requirements
    + * This requires {@link net.dv8tion.jda.api.utils.cache.CacheFlag#FORUM_TAGS CacheFlag.FORUM_TAGS} to be enabled. + * {@link net.dv8tion.jda.api.JDABuilder#createLight(String, Collection) JDABuilder.createLight(...)} disables this by default. + */ +package net.dv8tion.jda.api.events.channel.forum; + +import java.util.Collection; diff --git a/src/main/java/net/dv8tion/jda/api/events/channel/forum/update/package-info.java b/src/main/java/net/dv8tion/jda/api/events/channel/forum/update/package-info.java new file mode 100644 index 0000000000..edd5223567 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/channel/forum/update/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Events related to forum tags being modified. + */ +package net.dv8tion.jda.api.events.channel.forum.update; diff --git a/src/main/java/net/dv8tion/jda/api/events/channel/update/package-info.java b/src/main/java/net/dv8tion/jda/api/events/channel/update/package-info.java new file mode 100644 index 0000000000..901e73233e --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/channel/update/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Events indicating that a specific channel property was updated. + */ +package net.dv8tion.jda.api.events.channel.update; diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/invite/package-info.java b/src/main/java/net/dv8tion/jda/api/events/guild/invite/package-info.java new file mode 100644 index 0000000000..8be23a4b81 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/guild/invite/package-info.java @@ -0,0 +1,25 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Events relating to invites being created or deleted in a guild. + * + *

    Requirements
    + * + *

    These events require the {@link net.dv8tion.jda.api.requests.GatewayIntent#GUILD_INVITES GUILD_INVITES} intent to be enabled. + *
    These events will only fire for invite events that occur in channels where you can {@link net.dv8tion.jda.api.Permission#MANAGE_CHANNEL MANAGE_CHANNEL}. + */ +package net.dv8tion.jda.api.events.guild.invite; diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/member/update/package-info.java b/src/main/java/net/dv8tion/jda/api/events/guild/member/update/package-info.java new file mode 100644 index 0000000000..85df09d110 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/guild/member/update/package-info.java @@ -0,0 +1,31 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Events for {@link net.dv8tion.jda.api.entities.Member Member} updates. + * + *

    Requirements
    + * + *

    These events require the {@link net.dv8tion.jda.api.requests.GatewayIntent#GUILD_MEMBERS GUILD_MEMBERS} intent to be enabled. + *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and + * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! + * + *

    Additionally, these events require the {@link net.dv8tion.jda.api.utils.MemberCachePolicy MemberCachePolicy} + * to cache the updated members. Discord does not specifically tell us about the updates, but merely tells us the + * member was updated and gives us the updated member object. In order to fire specific events we + * need to have the old member cached to compare against. + */ +package net.dv8tion.jda.api.events.guild.member.update; diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/override/package-info.java b/src/main/java/net/dv8tion/jda/api/events/guild/override/package-info.java new file mode 100644 index 0000000000..68a355d320 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/guild/override/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Events for {@link net.dv8tion.jda.api.entities.PermissionOverride PermissionOverride} updates. + */ +package net.dv8tion.jda.api.events.guild.override; diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/GenericScheduledEventUserEvent.java b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/GenericScheduledEventUserEvent.java index 2743e1a664..403b489a83 100644 --- a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/GenericScheduledEventUserEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/GenericScheduledEventUserEvent.java @@ -30,14 +30,14 @@ /** * Indicates that a {@link User User} has subscribed or unsubscribed to a {@link ScheduledEvent ScheduledEvent}. * + *

    Can be used to detect when someone has indicated that they have subscribed or unsubscribed to an event and also retrieve their + * {@link User User} object as well as the {@link ScheduledEvent}. + * *

    Requirements
    * *

    This event requires the {@link net.dv8tion.jda.api.requests.GatewayIntent#SCHEDULED_EVENTS SCHEDULED_EVENTS} intent and {@link CacheFlag#SCHEDULED_EVENTS} to be enabled. *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! - * - * Can be used to detect when someone has indicated that they have subscribed or unsubscribed to an event and also retrieve their - * {@link User User} object as well as the {@link ScheduledEvent}. */ public abstract class GenericScheduledEventUserEvent extends GenericScheduledEventGatewayEvent { diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventCreateEvent.java b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventCreateEvent.java index 8ba9b5c5b9..9d121b2fa2 100644 --- a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventCreateEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventCreateEvent.java @@ -24,13 +24,13 @@ /** * Indicates that a {@link ScheduledEvent} object has been created. * + *

    Can be used to detect when a {@link ScheduledEvent} was created and retrieve the created scheduled event. + * *

    Requirements
    * *

    This event requires the {@link net.dv8tion.jda.api.requests.GatewayIntent#SCHEDULED_EVENTS SCHEDULED_EVENTS} intent and {@link CacheFlag#SCHEDULED_EVENTS} to be enabled. *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! - * - * Can be used to detect when a {@link ScheduledEvent} was created and retrieve the created scheduled event. */ public class ScheduledEventCreateEvent extends GenericScheduledEventGatewayEvent { diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventDeleteEvent.java b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventDeleteEvent.java index e08ab94be9..9f4c2b8f31 100644 --- a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventDeleteEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventDeleteEvent.java @@ -24,13 +24,13 @@ /** * Indicates that a {@link ScheduledEvent} object has been deleted. * + *

    Can be used to detect when a {@link ScheduledEvent} was deleted and retrieve the deleted scheduled event. + * *

    Requirements
    * *

    This event requires the {@link net.dv8tion.jda.api.requests.GatewayIntent#SCHEDULED_EVENTS SCHEDULED_EVENTS} intent and {@link CacheFlag#SCHEDULED_EVENTS} to be enabled. *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! - * - * Can be used to detect when a {@link ScheduledEvent} was deleted and retrieve the deleted scheduled event. */ public class ScheduledEventDeleteEvent extends GenericScheduledEventGatewayEvent { diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventUserAddEvent.java b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventUserAddEvent.java index 0e6de48a6d..1e37dccb75 100644 --- a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventUserAddEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventUserAddEvent.java @@ -24,14 +24,14 @@ /** * Indicates that a {@link net.dv8tion.jda.api.entities.User User} has subscribed to a {@link ScheduledEvent ScheduledEvent}. * + *

    Can be used to detect when someone has subscribed to an event and also retrieve their + * {@link net.dv8tion.jda.api.entities.User User} object as well as the {@link ScheduledEvent}. + * *

    Requirements
    * *

    This event requires the {@link net.dv8tion.jda.api.requests.GatewayIntent#SCHEDULED_EVENTS SCHEDULED_EVENTS} intent and {@link CacheFlag#SCHEDULED_EVENTS} to be enabled. *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! - * - * Can be used to detect when someone has subscribed to an event and also retrieve their - * {@link net.dv8tion.jda.api.entities.User User} object as well as the {@link ScheduledEvent}. */ public class ScheduledEventUserAddEvent extends GenericScheduledEventUserEvent { diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventUserRemoveEvent.java b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventUserRemoveEvent.java index 4939f795b9..e3358a302e 100644 --- a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventUserRemoveEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/ScheduledEventUserRemoveEvent.java @@ -24,14 +24,14 @@ /** * Indicates that a {@link net.dv8tion.jda.api.entities.User User} has unsubscribed from a {@link ScheduledEvent ScheduledEvent}. * + *

    Can be used to detect when someone unsubscribed to an event and also retrieve their + * {@link net.dv8tion.jda.api.entities.User User} object as well as the {@link ScheduledEvent}. + * *

    Requirements
    * *

    This event requires the {@link net.dv8tion.jda.api.requests.GatewayIntent#SCHEDULED_EVENTS SCHEDULED_EVENTS} intent and {@link CacheFlag#SCHEDULED_EVENTS} to be enabled. *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! - * - * Can be used to detect when someone unsubscribed to an event and also retrieve their - * {@link net.dv8tion.jda.api.entities.User User} object as well as the {@link ScheduledEvent}. */ public class ScheduledEventUserRemoveEvent extends GenericScheduledEventUserEvent { diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/GenericScheduledEventUpdateEvent.java b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/GenericScheduledEventUpdateEvent.java index efc749226e..b0d1a97b55 100644 --- a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/GenericScheduledEventUpdateEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/GenericScheduledEventUpdateEvent.java @@ -25,7 +25,7 @@ *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! * - * Discord does not specifically tell us about the updates, but merely tells us the + *

    Discord does not specifically tell us about the updates, but merely tells us the * {@link ScheduledEvent ScheduledEvent} was updated and gives us the updated {@link ScheduledEvent ScheduledEvent} object. * In order to fire a specific event like this we need to have the old {@link ScheduledEvent ScheduledEvent} cached to compare against. */ diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateDescriptionEvent.java b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateDescriptionEvent.java index 954a5bca31..e6c4ce7ec1 100644 --- a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateDescriptionEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateDescriptionEvent.java @@ -35,7 +35,7 @@ *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! * - * Discord does not specifically tell us about the updates, but merely tells us the + *

    Discord does not specifically tell us about the updates, but merely tells us the * {@link ScheduledEvent ScheduledEvent} was updated and gives us the updated {@link ScheduledEvent ScheduledEvent} object. * In order to fire a specific event like this we need to have the old {@link ScheduledEvent ScheduledEvent} cached to compare against. */ diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateEndTimeEvent.java b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateEndTimeEvent.java index d636fb3a8b..dac9f8de29 100644 --- a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateEndTimeEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateEndTimeEvent.java @@ -36,7 +36,7 @@ *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! * - * Discord does not specifically tell us about the updates, but merely tells us the + *

    Discord does not specifically tell us about the updates, but merely tells us the * {@link ScheduledEvent ScheduledEvent} was updated and gives us the updated {@link ScheduledEvent ScheduledEvent} object. * In order to fire a specific event like this we need to have the old {@link ScheduledEvent ScheduledEvent} cached to compare against. */ diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateImageEvent.java b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateImageEvent.java index 0ba813777c..541916fe62 100644 --- a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateImageEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateImageEvent.java @@ -34,7 +34,7 @@ *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! * - * Discord does not specifically tell us about the updates, but merely tells us the + *

    Discord does not specifically tell us about the updates, but merely tells us the * {@link ScheduledEvent ScheduledEvent} was updated and gives us the updated {@link ScheduledEvent ScheduledEvent} object. * In order to fire a specific event like this we need to have the old {@link ScheduledEvent ScheduledEvent} cached to compare against. */ diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateLocationEvent.java b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateLocationEvent.java index 5b3cded907..b9d20b8b7c 100644 --- a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateLocationEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateLocationEvent.java @@ -34,7 +34,7 @@ *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! * - * Discord does not specifically tell us about the updates, but merely tells us the + *

    Discord does not specifically tell us about the updates, but merely tells us the * {@link ScheduledEvent ScheduledEvent} was updated and gives us the updated {@link ScheduledEvent ScheduledEvent} object. * In order to fire a specific event like this we need to have the old {@link ScheduledEvent ScheduledEvent} cached to compare against. */ diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateNameEvent.java b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateNameEvent.java index 40d62528e2..afdc918aae 100644 --- a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateNameEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateNameEvent.java @@ -34,7 +34,7 @@ *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! * - * Discord does not specifically tell us about the updates, but merely tells us the + *

    Discord does not specifically tell us about the updates, but merely tells us the * {@link ScheduledEvent ScheduledEvent} was updated and gives us the updated {@link ScheduledEvent ScheduledEvent} object. * In order to fire a specific event like this we need to have the old {@link ScheduledEvent ScheduledEvent} cached to compare against. */ diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateStartTimeEvent.java b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateStartTimeEvent.java index dc8325c1a3..b55bbd9def 100644 --- a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateStartTimeEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateStartTimeEvent.java @@ -35,7 +35,7 @@ *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! * - * Discord does not specifically tell us about the updates, but merely tells us the + *

    Discord does not specifically tell us about the updates, but merely tells us the * {@link ScheduledEvent ScheduledEvent} was updated and gives us the updated {@link ScheduledEvent ScheduledEvent} object. * In order to fire a specific event like this we need to have the old {@link ScheduledEvent ScheduledEvent} cached to compare against. */ diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateStatusEvent.java b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateStatusEvent.java index 6ac185c119..c67977ddf6 100644 --- a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateStatusEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/ScheduledEventUpdateStatusEvent.java @@ -35,7 +35,7 @@ *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! * - * Discord does not specifically tell us about the updates, but merely tells us the + *

    Discord does not specifically tell us about the updates, but merely tells us the * {@link ScheduledEvent ScheduledEvent} was updated and gives us the updated {@link ScheduledEvent ScheduledEvent} object. * In order to fire a specific event like this we need to have the old {@link ScheduledEvent ScheduledEvent} cached to compare against. */ diff --git a/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/package-info.java b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/package-info.java new file mode 100644 index 0000000000..3fbb94114c --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/guild/scheduledevent/update/package-info.java @@ -0,0 +1,30 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Events for {@link net.dv8tion.jda.api.entities.ScheduledEvent ScheduleEvent} updates. + * + *

    Requirements
    + * + *

    These events require the {@link net.dv8tion.jda.api.requests.GatewayIntent#SCHEDULED_EVENTS SCHEDULED_EVENTS} intent and {@link net.dv8tion.jda.api.utils.cache.CacheFlag#SCHEDULED_EVENTS} to be enabled. + *
    {@link net.dv8tion.jda.api.JDABuilder#createDefault(String) createDefault(String)} and + * {@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disable this by default! + * + *

    Discord does not specifically tell us about the updates, but merely tells us the + * {@link net.dv8tion.jda.api.entities.ScheduledEvent ScheduledEvent} was updated and gives us the updated {@link net.dv8tion.jda.api.entities.ScheduledEvent ScheduledEvent} object. + * In order to fire specific events we need to have the old {@link net.dv8tion.jda.api.entities.ScheduledEvent ScheduledEvent} cached to compare against. + */ +package net.dv8tion.jda.api.events.guild.scheduledevent.update; diff --git a/src/main/java/net/dv8tion/jda/api/events/http/package-info.java b/src/main/java/net/dv8tion/jda/api/events/http/package-info.java new file mode 100644 index 0000000000..2a3ee69801 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/http/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Events fired in the context of HTTP requests being processed. + */ +package net.dv8tion.jda.api.events.http; diff --git a/src/main/java/net/dv8tion/jda/api/events/interaction/command/GenericPrivilegeUpdateEvent.java b/src/main/java/net/dv8tion/jda/api/events/interaction/command/GenericPrivilegeUpdateEvent.java index fa1a288c8d..291d2a823e 100644 --- a/src/main/java/net/dv8tion/jda/api/events/interaction/command/GenericPrivilegeUpdateEvent.java +++ b/src/main/java/net/dv8tion/jda/api/events/interaction/command/GenericPrivilegeUpdateEvent.java @@ -29,7 +29,7 @@ /** * Indicates that the privileges of an integration or its commands changed. * - * Can be used to get affected {@link Guild} and the new {@link IntegrationPrivilege IntegrationPrivileges} + *

    Can be used to get affected {@link Guild} and the new {@link IntegrationPrivilege IntegrationPrivileges} */ public abstract class GenericPrivilegeUpdateEvent extends GenericGuildEvent { @@ -49,7 +49,7 @@ public GenericPrivilegeUpdateEvent(@Nonnull JDA api, long responseNumber, @Nonnu /** * The target {@link PrivilegeTargetType Type}. * - * This can either be: + *

    This can either be: *

      *
    • {@link PrivilegeTargetType#INTEGRATION INTEGRATION} - If the privileges have been changed on the integration-level.
    • *
    • {@link PrivilegeTargetType#COMMAND COMMAND} - If the privileges have been changed on a command.
    • @@ -63,7 +63,7 @@ public GenericPrivilegeUpdateEvent(@Nonnull JDA api, long responseNumber, @Nonnu /** * The target-id. * - * This can either be the id of an integration, or of a command. + *

      This can either be the id of an integration, or of a command. * * @return The target-id. * @@ -77,7 +77,7 @@ public long getTargetIdLong() /** * The target-id. * - * This can either be the id of an integration, or of a command. + *

      This can either be the id of an integration, or of a command. * * @return The target-id. * diff --git a/src/main/java/net/dv8tion/jda/api/events/interaction/command/package-info.java b/src/main/java/net/dv8tion/jda/api/events/interaction/command/package-info.java new file mode 100644 index 0000000000..63365f566c --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/interaction/command/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Interaction events related to application commands. + */ +package net.dv8tion.jda.api.events.interaction.command; diff --git a/src/main/java/net/dv8tion/jda/api/events/interaction/component/package-info.java b/src/main/java/net/dv8tion/jda/api/events/interaction/component/package-info.java new file mode 100644 index 0000000000..08b7270e7d --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/interaction/component/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Interaction events related to message components. + */ +package net.dv8tion.jda.api.events.interaction.component; diff --git a/src/main/java/net/dv8tion/jda/api/events/interaction/package-info.java b/src/main/java/net/dv8tion/jda/api/events/interaction/package-info.java new file mode 100644 index 0000000000..17bba1f78d --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/interaction/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Abstractions for interaction events. + * + *

      Usually a more concrete event is desired. + */ +package net.dv8tion.jda.api.events.interaction; diff --git a/src/main/java/net/dv8tion/jda/api/events/stage/package-info.java b/src/main/java/net/dv8tion/jda/api/events/stage/package-info.java new file mode 100644 index 0000000000..a895c804fc --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/stage/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Events indicating when a stage instance is created or deleted. + */ +package net.dv8tion.jda.api.events.stage; diff --git a/src/main/java/net/dv8tion/jda/api/events/stage/update/package-info.java b/src/main/java/net/dv8tion/jda/api/events/stage/update/package-info.java new file mode 100644 index 0000000000..eb8a20f7fa --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/stage/update/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Events for stage instance updates. + */ +package net.dv8tion.jda.api.events.stage.update; diff --git a/src/main/java/net/dv8tion/jda/api/events/thread/member/package-info.java b/src/main/java/net/dv8tion/jda/api/events/thread/member/package-info.java new file mode 100644 index 0000000000..8a7034ac50 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/thread/member/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Events related to updates of the thread member list. + */ +package net.dv8tion.jda.api.events.thread.member; diff --git a/src/main/java/net/dv8tion/jda/api/events/thread/package-info.java b/src/main/java/net/dv8tion/jda/api/events/thread/package-info.java new file mode 100644 index 0000000000..5ab87a2dde --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/thread/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Events related to thread visibility. + */ +package net.dv8tion.jda.api.events.thread; diff --git a/src/main/java/net/dv8tion/jda/api/events/user/update/package-info.java b/src/main/java/net/dv8tion/jda/api/events/user/update/package-info.java new file mode 100644 index 0000000000..3160074cc1 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/events/user/update/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Events related to user updates, such as the name or avatar. + */ +package net.dv8tion.jda.api.events.user.update; diff --git a/src/main/java/net/dv8tion/jda/api/exceptions/ContextException.java b/src/main/java/net/dv8tion/jda/api/exceptions/ContextException.java index e858e35f3c..3206fd71a9 100644 --- a/src/main/java/net/dv8tion/jda/api/exceptions/ContextException.java +++ b/src/main/java/net/dv8tion/jda/api/exceptions/ContextException.java @@ -54,6 +54,9 @@ public static Consumer here(@Nonnull Consumer acce return new ContextConsumer(new ContextException(), acceptor); } + /** + * Wrapper for a failure {@link Consumer} that carries a {@link ContextException} as cause. + */ public static class ContextConsumer implements Consumer { private final ContextException context; diff --git a/src/main/java/net/dv8tion/jda/api/exceptions/HierarchyException.java b/src/main/java/net/dv8tion/jda/api/exceptions/HierarchyException.java index b97c8639f7..a10e188cfc 100644 --- a/src/main/java/net/dv8tion/jda/api/exceptions/HierarchyException.java +++ b/src/main/java/net/dv8tion/jda/api/exceptions/HierarchyException.java @@ -16,6 +16,12 @@ package net.dv8tion.jda.api.exceptions; +/** + * Exception indicating that a specific action requires to have a higher role than the target. + * + *

      This can also indicate that the target is the owner of the guild. + * For instance, when trying to modify the guild owner's nickname. + */ public class HierarchyException extends PermissionException { public HierarchyException(String reason) diff --git a/src/main/java/net/dv8tion/jda/api/exceptions/HttpException.java b/src/main/java/net/dv8tion/jda/api/exceptions/HttpException.java index e3d08a5e99..c46d987525 100644 --- a/src/main/java/net/dv8tion/jda/api/exceptions/HttpException.java +++ b/src/main/java/net/dv8tion/jda/api/exceptions/HttpException.java @@ -16,6 +16,9 @@ package net.dv8tion.jda.api.exceptions; +/** + * Indicates an unsuccessful HTTP request. + */ public class HttpException extends RuntimeException { public HttpException(String message) diff --git a/src/main/java/net/dv8tion/jda/api/exceptions/InvalidTokenException.java b/src/main/java/net/dv8tion/jda/api/exceptions/InvalidTokenException.java index 854c8a2d60..af96b95a33 100644 --- a/src/main/java/net/dv8tion/jda/api/exceptions/InvalidTokenException.java +++ b/src/main/java/net/dv8tion/jda/api/exceptions/InvalidTokenException.java @@ -18,13 +18,11 @@ /** * Indicates that an invalid token was given when trying to login the Discord API - * - * */ + */ public class InvalidTokenException extends RuntimeException { - /** - * Constructs an InvalidTokenException with no detail message. + * Constructs an {@code InvalidTokenException} with no detail message. */ public InvalidTokenException() { @@ -32,8 +30,7 @@ public InvalidTokenException() } /** - * Constructs an InvalidTokenException with the - * specified detail message. + * Constructs an {@code InvalidTokenException} with the specified detail message. * * @param message * The detail message. diff --git a/src/main/java/net/dv8tion/jda/api/exceptions/ParsingException.java b/src/main/java/net/dv8tion/jda/api/exceptions/ParsingException.java index 96ee55d030..d1c6ae74e7 100644 --- a/src/main/java/net/dv8tion/jda/api/exceptions/ParsingException.java +++ b/src/main/java/net/dv8tion/jda/api/exceptions/ParsingException.java @@ -16,6 +16,12 @@ package net.dv8tion.jda.api.exceptions; +/** + * Indicates a failure in parsing or deserializing data. + * + * @see net.dv8tion.jda.api.utils.data.DataObject + * @see net.dv8tion.jda.api.utils.data.DataArray + */ public class ParsingException extends IllegalStateException { public ParsingException(String message, Exception cause) diff --git a/src/main/java/net/dv8tion/jda/api/interactions/callbacks/package-info.java b/src/main/java/net/dv8tion/jda/api/interactions/callbacks/package-info.java new file mode 100644 index 0000000000..b0a9e97680 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/interactions/callbacks/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Types of interaction responses, like message replies or message edits. + */ +package net.dv8tion.jda.api.interactions.callbacks; diff --git a/src/main/java/net/dv8tion/jda/api/interactions/commands/build/package-info.java b/src/main/java/net/dv8tion/jda/api/interactions/commands/build/package-info.java new file mode 100644 index 0000000000..d4796e385b --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/interactions/commands/build/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Types and utilities for building application commands. + */ +package net.dv8tion.jda.api.interactions.commands.build; diff --git a/src/main/java/net/dv8tion/jda/api/interactions/commands/context/package-info.java b/src/main/java/net/dv8tion/jda/api/interactions/commands/context/package-info.java new file mode 100644 index 0000000000..bfd7264ea2 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/interactions/commands/context/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Interactions related to context menus. + */ +package net.dv8tion.jda.api.interactions.commands.context; diff --git a/src/main/java/net/dv8tion/jda/api/interactions/commands/localization/package-info.java b/src/main/java/net/dv8tion/jda/api/interactions/commands/localization/package-info.java new file mode 100644 index 0000000000..4e79a1c861 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/interactions/commands/localization/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Utilities for localization of application commands. + */ +package net.dv8tion.jda.api.interactions.commands.localization; diff --git a/src/main/java/net/dv8tion/jda/api/interactions/commands/package-info.java b/src/main/java/net/dv8tion/jda/api/interactions/commands/package-info.java new file mode 100644 index 0000000000..20d9d097bb --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/interactions/commands/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Abstractions for application commands and related interactions. + */ +package net.dv8tion.jda.api.interactions.commands; diff --git a/src/main/java/net/dv8tion/jda/api/interactions/commands/privileges/package-info.java b/src/main/java/net/dv8tion/jda/api/interactions/commands/privileges/package-info.java new file mode 100644 index 0000000000..b54ded0dc7 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/interactions/commands/privileges/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Types related to application command privileges, often referred to as command permissions. + * + *

      These are used to restrict the usage of application commands to specific users or roles. + */ +package net.dv8tion.jda.api.interactions.commands.privileges; diff --git a/src/main/java/net/dv8tion/jda/api/interactions/components/Component.java b/src/main/java/net/dv8tion/jda/api/interactions/components/Component.java index 58afe48279..1c5ddc2b0d 100644 --- a/src/main/java/net/dv8tion/jda/api/interactions/components/Component.java +++ b/src/main/java/net/dv8tion/jda/api/interactions/components/Component.java @@ -32,7 +32,6 @@ *

      Not every component can be used in {@link net.dv8tion.jda.api.entities.Message Messages} or {@link Modal Modals}. * Use {@link Type#isMessageCompatible()} and {@link Type#isModalCompatible()} to check whether a component can be used. * - * * @see ActionRow * * @see Button diff --git a/src/main/java/net/dv8tion/jda/api/interactions/components/buttons/package-info.java b/src/main/java/net/dv8tion/jda/api/interactions/components/buttons/package-info.java new file mode 100644 index 0000000000..70281c6733 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/interactions/components/buttons/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Button components. + */ +package net.dv8tion.jda.api.interactions.components.buttons; diff --git a/src/main/java/net/dv8tion/jda/api/interactions/components/package-info.java b/src/main/java/net/dv8tion/jda/api/interactions/components/package-info.java new file mode 100644 index 0000000000..ef9260ac96 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/interactions/components/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Abstraction types for message and modal components. + */ +package net.dv8tion.jda.api.interactions.components; diff --git a/src/main/java/net/dv8tion/jda/api/interactions/components/selections/package-info.java b/src/main/java/net/dv8tion/jda/api/interactions/components/selections/package-info.java new file mode 100644 index 0000000000..3b420fb188 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/interactions/components/selections/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Select menu components, also known as dropdowns. + */ +package net.dv8tion.jda.api.interactions.components.selections; diff --git a/src/main/java/net/dv8tion/jda/api/interactions/components/text/TextInput.java b/src/main/java/net/dv8tion/jda/api/interactions/components/text/TextInput.java index 6fdbe98657..ae56e51a63 100644 --- a/src/main/java/net/dv8tion/jda/api/interactions/components/text/TextInput.java +++ b/src/main/java/net/dv8tion/jda/api/interactions/components/text/TextInput.java @@ -27,7 +27,7 @@ /** * Represents a Discord Text input component * - * Must be used in {@link Modal Modals}! + *

      Must be used in {@link Modal Modals}! */ public interface TextInput extends ActionComponent { @@ -80,7 +80,7 @@ public interface TextInput extends ActionComponent /** * The minimum amount of characters that must be written to submit the Modal. * - * This is -1 if no length has been set! + *

      This is -1 if no length has been set! * * @return The minimum length of this TextInput component or -1 */ @@ -89,7 +89,7 @@ public interface TextInput extends ActionComponent /** * The maximum amount of characters that can be written to submit the Modal. * - * This is -1 if no length has been set! + *

      This is -1 if no length has been set! * * @return The maximum length of this TextInput component or -1 */ @@ -106,7 +106,7 @@ public interface TextInput extends ActionComponent * The pre-defined value of this TextInput component. *
      If this is not null, sending a Modal with this component will pre-populate the field with this String. * - * This is null if no pre-defined value has been set! + *

      This is null if no pre-defined value has been set! * * @return The value of this TextInput component or null. */ @@ -117,7 +117,7 @@ public interface TextInput extends ActionComponent * The placeholder of this TextInput component. *
      This is a short hint that describes the expected value of the TextInput field. * - * This is null if no placeholder has been set! + *

      This is null if no placeholder has been set! * * @return The placeholder of this TextInput component or null. */ @@ -281,7 +281,7 @@ public Builder setRequired(boolean required) /** * Sets the minimum length of this input field. Default is -1 (No minimum length). * - * This has to be between 0 and {@value #MAX_VALUE_LENGTH} + *

      This has to be between 0 and {@value #MAX_VALUE_LENGTH} * * @param minLength * The minimum amount of characters that need to be written diff --git a/src/main/java/net/dv8tion/jda/api/interactions/components/text/package-info.java b/src/main/java/net/dv8tion/jda/api/interactions/components/text/package-info.java new file mode 100644 index 0000000000..3704079fd2 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/interactions/components/text/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Text input components. + */ +package net.dv8tion.jda.api.interactions.components.text; diff --git a/src/main/java/net/dv8tion/jda/api/interactions/modals/package-info.java b/src/main/java/net/dv8tion/jda/api/interactions/modals/package-info.java new file mode 100644 index 0000000000..9257e436f1 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/interactions/modals/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Modals used for interactions. + */ +package net.dv8tion.jda.api.interactions.modals; diff --git a/src/main/java/net/dv8tion/jda/api/interactions/package-info.java b/src/main/java/net/dv8tion/jda/api/interactions/package-info.java new file mode 100644 index 0000000000..626d92725b --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/interactions/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Abstractions for interaction types. + */ +package net.dv8tion.jda.api.interactions; diff --git a/src/main/java/net/dv8tion/jda/api/managers/Manager.java b/src/main/java/net/dv8tion/jda/api/managers/Manager.java index 22999eb56a..bd47672e9d 100644 --- a/src/main/java/net/dv8tion/jda/api/managers/Manager.java +++ b/src/main/java/net/dv8tion/jda/api/managers/Manager.java @@ -24,6 +24,11 @@ import java.util.concurrent.TimeUnit; import java.util.function.BooleanSupplier; +/** + * Top-level abstraction for managers. + * + * @param The manager type + */ public interface Manager> extends AuditableRestAction { /** diff --git a/src/main/java/net/dv8tion/jda/api/managers/ThreadManager.java b/src/main/java/net/dv8tion/jda/api/managers/ThreadManager.java deleted file mode 100644 index 94e47e1537..0000000000 --- a/src/main/java/net/dv8tion/jda/api/managers/ThreadManager.java +++ /dev/null @@ -1,5 +0,0 @@ -package net.dv8tion.jda.api.managers; - -public class ThreadManager -{ -} diff --git a/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/IAgeRestrictedChannelManager.java b/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/IAgeRestrictedChannelManager.java index 28e6b4b107..abc365d9d3 100644 --- a/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/IAgeRestrictedChannelManager.java +++ b/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/IAgeRestrictedChannelManager.java @@ -22,6 +22,12 @@ import javax.annotation.CheckReturnValue; import javax.annotation.Nonnull; +/** + * Manager abstraction to set whether a channel is NSFW or Age-Restricted. + * + * @param The channel type + * @param The manager type + */ public interface IAgeRestrictedChannelManager> extends ChannelManager { diff --git a/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/ICategorizableChannelManager.java b/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/ICategorizableChannelManager.java index c499cdea38..b6bc4ef1f9 100644 --- a/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/ICategorizableChannelManager.java +++ b/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/ICategorizableChannelManager.java @@ -30,6 +30,12 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; +/** + * Manager abstraction to set the {@link Category Parent Category} of a {@link ICategorizableChannel categorizable channel}. + * + * @param The channel type + * @param The manager type + */ public interface ICategorizableChannelManager> extends ChannelManager, IPermissionContainerManager { @@ -37,7 +43,6 @@ public interface ICategorizableChannelManager{@link Category Parent Category} * of the selected {@link GuildChannel GuildChannel}. * - * * @param category * The new parent for the selected {@link GuildChannel GuildChannel} * diff --git a/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/IPermissionContainerManager.java b/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/IPermissionContainerManager.java index 48c9c2b10a..913da43b26 100644 --- a/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/IPermissionContainerManager.java +++ b/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/IPermissionContainerManager.java @@ -27,9 +27,14 @@ import javax.annotation.Nullable; import java.util.Collection; +/** + * Manager abstraction to modify {@link PermissionOverride PermissionOverrides} of a {@link IPermissionContainer permission containing channel}. + * + * @param The channel type + * @param The manager type + */ public interface IPermissionContainerManager> extends ChannelManager { - /** * Clears the overrides added via {@link #putPermissionOverride(IPermissionHolder, Collection, Collection)}. * diff --git a/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/IPositionableChannelManager.java b/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/IPositionableChannelManager.java index 86791f9a46..3dae35c5f4 100644 --- a/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/IPositionableChannelManager.java +++ b/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/IPositionableChannelManager.java @@ -24,6 +24,12 @@ import javax.annotation.CheckReturnValue; import javax.annotation.Nonnull; +/** + * Manager abstraction to modify the position of a {@link IPositionableChannel positionable channel}. + * + * @param The channel type + * @param The manager type + */ public interface IPositionableChannelManager> extends ChannelManager { /** diff --git a/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/ISlowmodeChannelManager.java b/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/ISlowmodeChannelManager.java index 137d1553e3..2a68302e56 100644 --- a/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/ISlowmodeChannelManager.java +++ b/src/main/java/net/dv8tion/jda/api/managers/channel/attribute/ISlowmodeChannelManager.java @@ -49,7 +49,6 @@ public interface ISlowmodeChannelManagerThis is limited to the choices offered in {@link ThreadChannel.AutoArchiveDuration} * * @param autoArchiveDuration * The new duration before an inactive channel will be autoarchived. @@ -85,7 +85,7 @@ public interface ThreadChannelManager extends ChannelManagerThis is the equivalent of archiving as a moderator. * * @param locked * The new locked state for the selected {@link ThreadChannel} @@ -104,7 +104,7 @@ public interface ThreadChannelManager extends ChannelManagerThis property can only be set on private ThreadChannels. + *

      This property can only be set on private ThreadChannels. * * @param invitable * The new invitable state for the selected {@link ThreadChannel} @@ -127,7 +127,7 @@ public interface ThreadChannelManager extends ChannelManagerThis property can only be set on forum post threads. + *

      This property can only be set on forum post threads. * * @param pinned * The new pinned state for the selected {@link ThreadChannel} diff --git a/src/main/java/net/dv8tion/jda/api/managers/channel/concrete/VoiceChannelManager.java b/src/main/java/net/dv8tion/jda/api/managers/channel/concrete/VoiceChannelManager.java index 29dcda78f4..b764973147 100644 --- a/src/main/java/net/dv8tion/jda/api/managers/channel/concrete/VoiceChannelManager.java +++ b/src/main/java/net/dv8tion/jda/api/managers/channel/concrete/VoiceChannelManager.java @@ -22,7 +22,16 @@ import net.dv8tion.jda.api.managers.channel.middleman.AudioChannelManager; import net.dv8tion.jda.api.managers.channel.middleman.StandardGuildChannelManager; -//TODO-v5: Docs +/** + * Manager providing methods to modify a {@link VoiceChannel}. + * + *

      Example + *

      {@code
      + * manager.setName("Music")
      + *        .setBitrate(96000)
      + *        .queue();
      + * }
      + */ public interface VoiceChannelManager extends AudioChannelManager, StandardGuildChannelManager, diff --git a/src/main/java/net/dv8tion/jda/api/managers/channel/concrete/package-info.java b/src/main/java/net/dv8tion/jda/api/managers/channel/concrete/package-info.java new file mode 100644 index 0000000000..3c3b1ebf3f --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/managers/channel/concrete/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Concrete channel manager types for actual channel types. + */ +package net.dv8tion.jda.api.managers.channel.concrete; diff --git a/src/main/java/net/dv8tion/jda/api/managers/channel/middleman/AudioChannelManager.java b/src/main/java/net/dv8tion/jda/api/managers/channel/middleman/AudioChannelManager.java index dd4887b112..053edf2f0c 100644 --- a/src/main/java/net/dv8tion/jda/api/managers/channel/middleman/AudioChannelManager.java +++ b/src/main/java/net/dv8tion/jda/api/managers/channel/middleman/AudioChannelManager.java @@ -25,7 +25,24 @@ import javax.annotation.CheckReturnValue; import javax.annotation.Nonnull; -//todo-v5: Docs +/** + * Manager providing functionality common for all {@link net.dv8tion.jda.api.entities.channel.middleman.AudioChannel AudioChannels}. + * + *

      Example + *

      {@code
      + * manager.setBitrate(48000)
      + *        .setRegion(Region.AUTOMATIC)
      + *        .queue();
      + * manager.reset(ChannelManager.REGION | ChannelManager.BITRATE)
      + *        .setRegion(Region.BRAZIL)
      + *        .queue();
      + * }
      + * + * @param The channel type + * @param The manager type + * + * @see net.dv8tion.jda.api.entities.channel.middleman.AudioChannel#getManager() + */ public interface AudioChannelManager> extends StandardGuildChannelManager { /** @@ -108,5 +125,5 @@ public interface AudioChannelManager The expected type of the response + */ public class Request { private final JDAImpl api; diff --git a/src/main/java/net/dv8tion/jda/api/requests/Response.java b/src/main/java/net/dv8tion/jda/api/requests/Response.java index 56e9fdb5f5..c09486c983 100644 --- a/src/main/java/net/dv8tion/jda/api/requests/Response.java +++ b/src/main/java/net/dv8tion/jda/api/requests/Response.java @@ -30,6 +30,9 @@ import java.util.Set; import java.util.stream.Collectors; +/** + * Internal class used to represent HTTP responses or request failures. + */ public class Response implements Closeable { public static final int ERROR_CODE = -1; diff --git a/src/main/java/net/dv8tion/jda/api/requests/RestAction.java b/src/main/java/net/dv8tion/jda/api/requests/RestAction.java index 3675c8f39d..d4b2a7f747 100644 --- a/src/main/java/net/dv8tion/jda/api/requests/RestAction.java +++ b/src/main/java/net/dv8tion/jda/api/requests/RestAction.java @@ -787,7 +787,6 @@ default RestAction map(@Nonnull Function map) * The consuming function to apply to the action result, failures are propagated * into the resulting action * - * * @throws IllegalArgumentException * If the consumer is null * diff --git a/src/main/java/net/dv8tion/jda/api/requests/RestFuture.java b/src/main/java/net/dv8tion/jda/api/requests/RestFuture.java index 3fc9798d5b..ff318c45b2 100644 --- a/src/main/java/net/dv8tion/jda/api/requests/RestFuture.java +++ b/src/main/java/net/dv8tion/jda/api/requests/RestFuture.java @@ -24,6 +24,11 @@ import java.util.concurrent.CompletableFuture; import java.util.function.BooleanSupplier; +/** + * Implementation of {@link CompletableFuture} used for {@link RestAction#submit()}. + * + * @param The result type + */ public class RestFuture extends CompletableFuture { final Request request; diff --git a/src/main/java/net/dv8tion/jda/api/requests/restaction/ThreadChannelAction.java b/src/main/java/net/dv8tion/jda/api/requests/restaction/ThreadChannelAction.java index 8c35b00a95..afb3057303 100644 --- a/src/main/java/net/dv8tion/jda/api/requests/restaction/ThreadChannelAction.java +++ b/src/main/java/net/dv8tion/jda/api/requests/restaction/ThreadChannelAction.java @@ -35,7 +35,15 @@ */ public interface ThreadChannelAction extends AbstractThreadCreateAction, FluentAuditableRestAction { - //TODO-v5: Docs + /** + * Sets whether this channel allows all members to add new members. + *
      When set to false, only moderators and the thread owner can add new members. + * + * @param isInvitable + * True, if all members should be allowed to add new members + * + * @return The current ThreadChannelAction for chaining convenience + */ @Nonnull @CheckReturnValue ThreadChannelAction setInvitable(boolean isInvitable); diff --git a/src/main/java/net/dv8tion/jda/api/requests/restaction/interactions/package-info.java b/src/main/java/net/dv8tion/jda/api/requests/restaction/interactions/package-info.java new file mode 100644 index 0000000000..f8a6b3122e --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/requests/restaction/interactions/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * RestAction types related to interaction responses. + */ +package net.dv8tion.jda.api.requests.restaction.interactions; diff --git a/src/main/java/net/dv8tion/jda/api/requests/restaction/pagination/ThreadChannelPaginationAction.java b/src/main/java/net/dv8tion/jda/api/requests/restaction/pagination/ThreadChannelPaginationAction.java index dab41cc2e9..fdfe9fbec0 100644 --- a/src/main/java/net/dv8tion/jda/api/requests/restaction/pagination/ThreadChannelPaginationAction.java +++ b/src/main/java/net/dv8tion/jda/api/requests/restaction/pagination/ThreadChannelPaginationAction.java @@ -59,7 +59,12 @@ */ public interface ThreadChannelPaginationAction extends PaginationAction { - //TODO-v5: Docs + /** + * The {@link IThreadContainerUnion} for this action + *
      This can also be used for casting down to more concrete types. + * + * @return {@link IThreadContainerUnion} + */ @Nonnull IThreadContainerUnion getChannel(); diff --git a/src/main/java/net/dv8tion/jda/api/sharding/DefaultShardManagerBuilder.java b/src/main/java/net/dv8tion/jda/api/sharding/DefaultShardManagerBuilder.java index e4e6bd435c..c6e0ef2e8b 100644 --- a/src/main/java/net/dv8tion/jda/api/sharding/DefaultShardManagerBuilder.java +++ b/src/main/java/net/dv8tion/jda/api/sharding/DefaultShardManagerBuilder.java @@ -1049,7 +1049,7 @@ public DefaultShardManagerBuilder setAudioSendFactory(@Nullable final IAudioSend * Sets whether or not JDA should try to reconnect if a connection-error is encountered. *
      This will use an incremental reconnect (timeouts are increased each time an attempt fails). * - * Default: true (enabled) + *

      Default: true (enabled) * * @param autoReconnect * If true - enables autoReconnect diff --git a/src/main/java/net/dv8tion/jda/api/sharding/ShardManager.java b/src/main/java/net/dv8tion/jda/api/sharding/ShardManager.java index 19464ab700..1d8151a102 100644 --- a/src/main/java/net/dv8tion/jda/api/sharding/ShardManager.java +++ b/src/main/java/net/dv8tion/jda/api/sharding/ShardManager.java @@ -139,7 +139,7 @@ default void removeEventListeners(@Nonnull final IntFunction> * Remove a listener provider. This will stop further created / restarted shards from getting a listener added by * that provider. * - * Default is a no-op for backwards compatibility, see implementations like + *

      Default is a no-op for backwards compatibility, see implementations like * {@link DefaultShardManager#removeEventListenerProvider(IntFunction)} for actual code * * @param eventListenerProvider @@ -285,7 +285,6 @@ default RichCustomEmoji getEmojiById(@Nonnull final String id) * Unified {@link net.dv8tion.jda.api.utils.cache.SnowflakeCacheView SnowflakeCacheView} of * all cached {@link RichCustomEmoji RichCustomEmojis} visible to this ShardManager instance. * - * * @return Unified {@link net.dv8tion.jda.api.utils.cache.SnowflakeCacheView SnowflakeCacheView} */ @Nonnull diff --git a/src/main/java/net/dv8tion/jda/api/utils/IOBiConsumer.java b/src/main/java/net/dv8tion/jda/api/utils/IOBiConsumer.java index 65405796d2..f5abc7fa6b 100644 --- a/src/main/java/net/dv8tion/jda/api/utils/IOBiConsumer.java +++ b/src/main/java/net/dv8tion/jda/api/utils/IOBiConsumer.java @@ -18,6 +18,12 @@ import java.io.IOException; +/** + * Consumer accepting two arguments and throwing {@link IOException}. + * + * @param The type of the first argument + * @param The type of the second argument + */ @FunctionalInterface public interface IOBiConsumer { diff --git a/src/main/java/net/dv8tion/jda/api/utils/IOConsumer.java b/src/main/java/net/dv8tion/jda/api/utils/IOConsumer.java index a8838d7f1a..57fe77f050 100644 --- a/src/main/java/net/dv8tion/jda/api/utils/IOConsumer.java +++ b/src/main/java/net/dv8tion/jda/api/utils/IOConsumer.java @@ -18,6 +18,11 @@ import java.io.IOException; +/** + * Consumer accepting one argument and throwing {@link IOException}. + * + * @param The type of the argument + */ @FunctionalInterface public interface IOConsumer { diff --git a/src/main/java/net/dv8tion/jda/api/utils/IOFunction.java b/src/main/java/net/dv8tion/jda/api/utils/IOFunction.java index 6176ad24e6..d218420bfe 100644 --- a/src/main/java/net/dv8tion/jda/api/utils/IOFunction.java +++ b/src/main/java/net/dv8tion/jda/api/utils/IOFunction.java @@ -18,6 +18,12 @@ import java.io.IOException; +/** + * Function accepting one argument and throwing {@link IOException}. + * + * @param The type of the argument + * @param The type of the return value + */ @FunctionalInterface public interface IOFunction { diff --git a/src/main/java/net/dv8tion/jda/api/utils/MarkdownUtil.java b/src/main/java/net/dv8tion/jda/api/utils/MarkdownUtil.java index 50816a712b..a37d97b997 100644 --- a/src/main/java/net/dv8tion/jda/api/utils/MarkdownUtil.java +++ b/src/main/java/net/dv8tion/jda/api/utils/MarkdownUtil.java @@ -19,6 +19,9 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; +/** + * Utility class to escape markdown characters. + */ public final class MarkdownUtil { private MarkdownUtil() {} diff --git a/src/main/java/net/dv8tion/jda/api/utils/MiscUtil.java b/src/main/java/net/dv8tion/jda/api/utils/MiscUtil.java index b7f54dd9c8..bd4ee315c4 100644 --- a/src/main/java/net/dv8tion/jda/api/utils/MiscUtil.java +++ b/src/main/java/net/dv8tion/jda/api/utils/MiscUtil.java @@ -30,12 +30,15 @@ import java.util.concurrent.locks.ReentrantLock; import java.util.function.Supplier; +/** + * Utility methods for various aspects of the API. + */ public class MiscUtil { /** * Returns the shard id the given guild will be loaded on for the given amount of shards. * - * Discord determines which guilds a shard is connect to using the following format: + *

      Discord determines which guilds a shard is connect to using the following format: * {@code shardId == (guildId >>> 22) % totalShards} *
      Source for formula: Discord Documentation * @@ -54,7 +57,7 @@ public static int getShardForGuild(long guildId, int shards) /** * Returns the shard id the given guild will be loaded on for the given amount of shards. * - * Discord determines which guilds a shard is connect to using the following format: + *

      Discord determines which guilds a shard is connect to using the following format: * {@code shardId == (guildId >>> 22) % totalShards} *
      Source for formula: Discord Documentation * @@ -73,7 +76,7 @@ public static int getShardForGuild(String guildId, int shards) /** * Returns the shard id the given {@link net.dv8tion.jda.api.entities.Guild Guild} will be loaded on for the given amount of shards. * - * Discord determines which guilds a shard is connect to using the following format: + *

      Discord determines which guilds a shard is connect to using the following format: * {@code shardId == (guildId >>> 22) % totalShards} *
      Source for formula: Discord Documentation * diff --git a/src/main/java/net/dv8tion/jda/api/utils/Procedure.java b/src/main/java/net/dv8tion/jda/api/utils/Procedure.java index 1d7e64aaca..d995a213e7 100644 --- a/src/main/java/net/dv8tion/jda/api/utils/Procedure.java +++ b/src/main/java/net/dv8tion/jda/api/utils/Procedure.java @@ -18,6 +18,11 @@ import javax.annotation.Nonnull; +/** + * Iteration procedure accepting one argument and returning whether to continue iteration. + * + * @param The type of the argument + */ @FunctionalInterface public interface Procedure { diff --git a/src/main/java/net/dv8tion/jda/api/utils/SessionControllerAdapter.java b/src/main/java/net/dv8tion/jda/api/utils/SessionControllerAdapter.java index 85d7406cec..cdb64dcdc4 100644 --- a/src/main/java/net/dv8tion/jda/api/utils/SessionControllerAdapter.java +++ b/src/main/java/net/dv8tion/jda/api/utils/SessionControllerAdapter.java @@ -33,6 +33,11 @@ import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.TimeUnit; +/** + * Simple implementation of {@link SessionController} without supporting concurrency. + * + * @see ConcurrentSessionController + */ public class SessionControllerAdapter implements SessionController { protected static final Logger log = JDALogger.getLog(SessionControllerAdapter.class); diff --git a/src/main/java/net/dv8tion/jda/api/utils/TimeUtil.java b/src/main/java/net/dv8tion/jda/api/utils/TimeUtil.java index be892510d4..364c4b5774 100644 --- a/src/main/java/net/dv8tion/jda/api/utils/TimeUtil.java +++ b/src/main/java/net/dv8tion/jda/api/utils/TimeUtil.java @@ -25,6 +25,9 @@ import java.util.Calendar; import java.util.TimeZone; +/** + * Utility for various time related features of the API. + */ public class TimeUtil { public static final long DISCORD_EPOCH = 1420070400000L; diff --git a/src/main/java/net/dv8tion/jda/api/utils/messages/package-info.java b/src/main/java/net/dv8tion/jda/api/utils/messages/package-info.java new file mode 100644 index 0000000000..b83c9113b2 --- /dev/null +++ b/src/main/java/net/dv8tion/jda/api/utils/messages/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Utilities for message building and formatting. + */ +package net.dv8tion.jda.api.utils.messages;