diff --git a/src/examples/java/AudioEchoExample.java b/src/examples/java/AudioEchoExample.java index a3a6c97a20..3b4a404bde 100644 --- a/src/examples/java/AudioEchoExample.java +++ b/src/examples/java/AudioEchoExample.java @@ -20,6 +20,9 @@ import net.dv8tion.jda.api.audio.AudioSendHandler; import net.dv8tion.jda.api.audio.CombinedAudio; import net.dv8tion.jda.api.entities.*; +import net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel; +import net.dv8tion.jda.api.entities.channel.middleman.AudioChannel; +import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; import net.dv8tion.jda.api.hooks.ListenerAdapter; import net.dv8tion.jda.api.managers.AudioManager; diff --git a/src/examples/java/MessageLoggerExample.java b/src/examples/java/MessageLoggerExample.java index 089a421b69..727af84466 100644 --- a/src/examples/java/MessageLoggerExample.java +++ b/src/examples/java/MessageLoggerExample.java @@ -17,9 +17,9 @@ import net.dv8tion.jda.api.JDA; import net.dv8tion.jda.api.JDABuilder; import net.dv8tion.jda.api.entities.Activity; -import net.dv8tion.jda.api.entities.ChannelType; import net.dv8tion.jda.api.entities.Message; import net.dv8tion.jda.api.entities.User; +import net.dv8tion.jda.api.entities.channel.ChannelType; import net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion; import net.dv8tion.jda.api.entities.emoji.Emoji; import net.dv8tion.jda.api.events.message.MessageReceivedEvent; diff --git a/src/examples/java/SlashBotExample.java b/src/examples/java/SlashBotExample.java index 629174e928..15253b3e2d 100644 --- a/src/examples/java/SlashBotExample.java +++ b/src/examples/java/SlashBotExample.java @@ -18,8 +18,8 @@ import net.dv8tion.jda.api.JDABuilder; import net.dv8tion.jda.api.Permission; import net.dv8tion.jda.api.entities.Member; -import net.dv8tion.jda.api.entities.MessageChannel; import net.dv8tion.jda.api.entities.User; +import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel; import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent; import net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent; import net.dv8tion.jda.api.hooks.ListenerAdapter; diff --git a/src/main/java/net/dv8tion/jda/api/EmbedBuilder.java b/src/main/java/net/dv8tion/jda/api/EmbedBuilder.java index 2516fa5aa9..ffd1d904b2 100644 --- a/src/main/java/net/dv8tion/jda/api/EmbedBuilder.java +++ b/src/main/java/net/dv8tion/jda/api/EmbedBuilder.java @@ -57,7 +57,7 @@ public class EmbedBuilder /** * Constructs a new EmbedBuilder instance, which can be used to create {@link net.dv8tion.jda.api.entities.MessageEmbed MessageEmbeds}. - * These can then be sent to a channel using {@link net.dv8tion.jda.api.entities.MessageChannel#sendMessageEmbeds(MessageEmbed, MessageEmbed...)}. + * These can then be sent to a channel using {@link net.dv8tion.jda.api.entities.channel.middleman.MessageChannel#sendMessageEmbeds(MessageEmbed, MessageEmbed...)}. *
Every part of an embed can be removed or cleared by providing {@code null} to the setter method. */ public EmbedBuilder() { } @@ -432,7 +432,7 @@ public EmbedBuilder setColor(int color) * *

Uploading images with Embeds *
When uploading an image - * (using {@link net.dv8tion.jda.api.entities.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...)}) + * (using {@link net.dv8tion.jda.api.entities.channel.middleman.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...)}) * you can reference said image using the specified filename as URI {@code attachment://filename.ext}. * *

Example @@ -479,7 +479,7 @@ public EmbedBuilder setThumbnail(@Nullable String url) * *

Uploading images with Embeds *
When uploading an image - * (using {@link net.dv8tion.jda.api.entities.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...)}) + * (using {@link net.dv8tion.jda.api.entities.channel.middleman.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...)}) * you can reference said image using the specified filename as URI {@code attachment://filename.ext}. * *

Example @@ -504,7 +504,7 @@ public EmbedBuilder setThumbnail(@Nullable String url) * * @return the builder after the image has been set * - * @see net.dv8tion.jda.api.entities.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...) + * @see net.dv8tion.jda.api.entities.channel.middleman.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...) */ @Nonnull public EmbedBuilder setImage(@Nullable String url) @@ -580,7 +580,7 @@ public EmbedBuilder setAuthor(@Nullable String name, @Nullable String url) * *

Uploading images with Embeds *
When uploading an image - * (using {@link net.dv8tion.jda.api.entities.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...)}) + * (using {@link net.dv8tion.jda.api.entities.channel.middleman.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...)}) * you can reference said image using the specified filename as URI {@code attachment://filename.ext}. * *

Example @@ -660,7 +660,7 @@ public EmbedBuilder setFooter(@Nullable String text) * *

Uploading images with Embeds *
When uploading an image - * (using {@link net.dv8tion.jda.api.entities.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...)}) + * (using {@link net.dv8tion.jda.api.entities.channel.middleman.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...)}) * you can reference said image using the specified filename as URI {@code attachment://filename.ext}. * *

Example diff --git a/src/main/java/net/dv8tion/jda/api/JDA.java b/src/main/java/net/dv8tion/jda/api/JDA.java index 5ab678125c..aa5534c44b 100644 --- a/src/main/java/net/dv8tion/jda/api/JDA.java +++ b/src/main/java/net/dv8tion/jda/api/JDA.java @@ -17,7 +17,11 @@ package net.dv8tion.jda.api; import net.dv8tion.jda.api.entities.*; -import net.dv8tion.jda.api.entities.channel.IGuildChannelContainer; +import net.dv8tion.jda.api.entities.channel.Channel; +import net.dv8tion.jda.api.entities.channel.attribute.IGuildChannelContainer; +import net.dv8tion.jda.api.entities.channel.concrete.PrivateChannel; +import net.dv8tion.jda.api.entities.channel.concrete.TextChannel; +import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel; import net.dv8tion.jda.api.entities.emoji.RichCustomEmoji; import net.dv8tion.jda.api.entities.sticker.*; import net.dv8tion.jda.api.hooks.IEventManager; @@ -1244,7 +1248,7 @@ default T getChannelById(@Nonnull Class type, long id) /** * {@link net.dv8tion.jda.api.utils.cache.SnowflakeCacheView SnowflakeCacheView} of - * all cached {@link net.dv8tion.jda.api.entities.PrivateChannel PrivateChannels} visible to this JDA session. + * all cached {@link PrivateChannel PrivateChannels} visible to this JDA session. * * @return {@link net.dv8tion.jda.api.utils.cache.SnowflakeCacheView SnowflakeCacheView} */ @@ -1252,14 +1256,14 @@ default T getChannelById(@Nonnull Class type, long id) SnowflakeCacheView getPrivateChannelCache(); /** - * An unmodifiable list of all known {@link net.dv8tion.jda.api.entities.PrivateChannel PrivateChannels}. + * An unmodifiable list of all known {@link PrivateChannel PrivateChannels}. * *

This copies the backing store into a list. This means every call * creates a new list with O(n) complexity. It is recommended to store this into * a local variable or use {@link #getPrivateChannelCache()} and use its more efficient * versions of handling these values. * - * @return Possibly-empty list of all {@link net.dv8tion.jda.api.entities.PrivateChannel PrivateChannels}. + * @return Possibly-empty list of all {@link PrivateChannel PrivateChannels}. */ @Nonnull default List getPrivateChannels() @@ -1268,16 +1272,16 @@ default List getPrivateChannels() } /** - * This returns the {@link net.dv8tion.jda.api.entities.PrivateChannel PrivateChannel} which has the same id as the one provided. - *
If there is no known {@link net.dv8tion.jda.api.entities.PrivateChannel PrivateChannel} with an id that matches the provided + * This returns the {@link PrivateChannel PrivateChannel} which has the same id as the one provided. + *
If there is no known {@link PrivateChannel PrivateChannel} with an id that matches the provided * one, then this returns {@code null}. * * @param id - * The id of the {@link net.dv8tion.jda.api.entities.PrivateChannel PrivateChannel}. + * The id of the {@link PrivateChannel PrivateChannel}. * @throws java.lang.NumberFormatException * If the provided {@code id} cannot be parsed by {@link Long#parseLong(String)} * - * @return Possibly-null {@link net.dv8tion.jda.api.entities.PrivateChannel PrivateChannel} with matching id. + * @return Possibly-null {@link PrivateChannel PrivateChannel} with matching id. */ @Nullable default PrivateChannel getPrivateChannelById(@Nonnull String id) @@ -1286,14 +1290,14 @@ default PrivateChannel getPrivateChannelById(@Nonnull String id) } /** - * This returns the {@link net.dv8tion.jda.api.entities.PrivateChannel PrivateChannel} which has the same id as the one provided. - *
If there is no known {@link net.dv8tion.jda.api.entities.PrivateChannel PrivateChannel} with an id that matches the provided + * This returns the {@link PrivateChannel PrivateChannel} which has the same id as the one provided. + *
If there is no known {@link PrivateChannel PrivateChannel} with an id that matches the provided * one, then this returns {@code null}. * * @param id - * The id of the {@link net.dv8tion.jda.api.entities.PrivateChannel PrivateChannel}. + * The id of the {@link PrivateChannel PrivateChannel}. * - * @return Possibly-null {@link net.dv8tion.jda.api.entities.PrivateChannel PrivateChannel} with matching id. + * @return Possibly-null {@link PrivateChannel PrivateChannel} with matching id. */ @Nullable default PrivateChannel getPrivateChannelById(long id) @@ -1382,7 +1386,7 @@ default RestAction openPrivateChannelById(@Nonnull String userId * *

Hint: To check whether you can use an {@link RichCustomEmoji} in a specific * context you can use {@link RichCustomEmoji#canInteract(net.dv8tion.jda.api.entities.Member)} or {@link - * RichCustomEmoji#canInteract(net.dv8tion.jda.api.entities.User, net.dv8tion.jda.api.entities.MessageChannel)} + * RichCustomEmoji#canInteract(net.dv8tion.jda.api.entities.User, MessageChannel)} * *

Unicode emojis are not included as {@link RichCustomEmoji Custom Emoji}! * diff --git a/src/main/java/net/dv8tion/jda/api/JDABuilder.java b/src/main/java/net/dv8tion/jda/api/JDABuilder.java index f0c7c20ad3..d28ce8255e 100644 --- a/src/main/java/net/dv8tion/jda/api/JDABuilder.java +++ b/src/main/java/net/dv8tion/jda/api/JDABuilder.java @@ -19,6 +19,7 @@ import net.dv8tion.jda.api.audio.factory.IAudioSendFactory; import net.dv8tion.jda.api.entities.Activity; import net.dv8tion.jda.api.events.Event; +import net.dv8tion.jda.api.exceptions.InvalidTokenException; import net.dv8tion.jda.api.hooks.IEventManager; import net.dv8tion.jda.api.hooks.VoiceDispatchInterceptor; import net.dv8tion.jda.api.requests.GatewayIntent; @@ -29,7 +30,6 @@ import net.dv8tion.jda.internal.managers.PresenceImpl; import net.dv8tion.jda.internal.utils.Checks; import net.dv8tion.jda.internal.utils.IOUtil; -import net.dv8tion.jda.api.exceptions.InvalidTokenException; import net.dv8tion.jda.internal.utils.config.AuthorizationConfig; import net.dv8tion.jda.internal.utils.config.MetaConfig; import net.dv8tion.jda.internal.utils.config.SessionConfig; diff --git a/src/main/java/net/dv8tion/jda/api/Permission.java b/src/main/java/net/dv8tion/jda/api/Permission.java index cdd683c6a8..3a68b95a8b 100644 --- a/src/main/java/net/dv8tion/jda/api/Permission.java +++ b/src/main/java/net/dv8tion/jda/api/Permission.java @@ -197,7 +197,7 @@ public boolean isChannel() } /** - * Whether this permission is specifically for {@link net.dv8tion.jda.api.entities.TextChannel TextChannels} + * Whether this permission is specifically for {@link net.dv8tion.jda.api.entities.channel.concrete.TextChannel TextChannels} * * @return True, if and only if this permission can only be applied to text channels */ @@ -207,7 +207,7 @@ public boolean isText() } /** - * Whether this permission is specifically for {@link net.dv8tion.jda.api.entities.VoiceChannel VoiceChannels} + * Whether this permission is specifically for {@link net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel VoiceChannels} * * @return True, if and only if this permission can only be applied to voice channels */ diff --git a/src/main/java/net/dv8tion/jda/api/Region.java b/src/main/java/net/dv8tion/jda/api/Region.java index 4e16d4ff0e..b459836a18 100644 --- a/src/main/java/net/dv8tion/jda/api/Region.java +++ b/src/main/java/net/dv8tion/jda/api/Region.java @@ -20,8 +20,8 @@ /** * Represents the Regions used for Audio connections. - *
This is used by {@link net.dv8tion.jda.api.entities.AudioChannel AudioChannels} to define where the audio server that hosts the - * {@link net.dv8tion.jda.api.entities.AudioChannel} is located. + *
This is used by {@link net.dv8tion.jda.api.entities.channel.middleman.AudioChannel AudioChannels} to define where the audio server that hosts the + * {@link net.dv8tion.jda.api.entities.channel.middleman.AudioChannel} is located. */ public enum Region { diff --git a/src/main/java/net/dv8tion/jda/api/audio/factory/IPacketProvider.java b/src/main/java/net/dv8tion/jda/api/audio/factory/IPacketProvider.java index f8f6f624a8..472603b602 100644 --- a/src/main/java/net/dv8tion/jda/api/audio/factory/IPacketProvider.java +++ b/src/main/java/net/dv8tion/jda/api/audio/factory/IPacketProvider.java @@ -17,7 +17,7 @@ package net.dv8tion.jda.api.audio.factory; import net.dv8tion.jda.api.audio.hooks.ConnectionStatus; -import net.dv8tion.jda.api.entities.AudioChannel; +import net.dv8tion.jda.api.entities.channel.middleman.AudioChannel; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -49,7 +49,7 @@ public interface IPacketProvider /** * Provides the current channel that this connection is transmitting to. * - * @return The {@link net.dv8tion.jda.api.entities.AudioChannel AudioChannel} that this connection is sending to. + * @return The {@link net.dv8tion.jda.api.entities.channel.middleman.AudioChannel AudioChannel} that this connection is sending to. */ @Nonnull AudioChannel getConnectedChannel(); diff --git a/src/main/java/net/dv8tion/jda/api/audit/ActionType.java b/src/main/java/net/dv8tion/jda/api/audit/ActionType.java index e2993c1254..bdeaa39bca 100644 --- a/src/main/java/net/dv8tion/jda/api/audit/ActionType.java +++ b/src/main/java/net/dv8tion/jda/api/audit/ActionType.java @@ -16,8 +16,8 @@ package net.dv8tion.jda.api.audit; -import net.dv8tion.jda.api.entities.GuildChannel; import net.dv8tion.jda.api.entities.Member; +import net.dv8tion.jda.api.entities.channel.middleman.GuildChannel; import net.dv8tion.jda.api.entities.emoji.RichCustomEmoji; /** @@ -447,7 +447,7 @@ public enum ActionType INTEGRATION_DELETE(82, TargetType.INTEGRATION), /** - * A {@link net.dv8tion.jda.api.entities.StageInstance StageInstance} was started by a {@link net.dv8tion.jda.api.entities.StageChannel#isModerator(Member) Stage Moderator}. + * A {@link net.dv8tion.jda.api.entities.StageInstance StageInstance} was started by a {@link net.dv8tion.jda.api.entities.channel.concrete.StageChannel#isModerator(Member) Stage Moderator}. * *

Possible Options
*

* * @param category - * The {@link net.dv8tion.jda.api.entities.Category Category} to order - * {@link net.dv8tion.jda.api.entities.VoiceChannel VoiceChannels} from. + * The {@link Category Category} to order + * {@link VoiceChannel VoiceChannels} from. * - * @return {@link CategoryOrderAction CategoryOrderAction} - Type: {@link net.dv8tion.jda.api.entities.VoiceChannel VoiceChannels} + * @return {@link CategoryOrderAction CategoryOrderAction} - Type: {@link VoiceChannel VoiceChannels} */ @Nonnull @CheckReturnValue @@ -4598,7 +4604,7 @@ default RoleOrderAction modifyRolePositions() /** * Represents the idle time allowed until a user is moved to the - * AFK {@link net.dv8tion.jda.api.entities.VoiceChannel} if one is set + * AFK {@link VoiceChannel} if one is set * ({@link net.dv8tion.jda.api.entities.Guild#getAfkChannel() Guild.getAfkChannel()}). */ enum Timeout diff --git a/src/main/java/net/dv8tion/jda/api/entities/GuildVoiceState.java b/src/main/java/net/dv8tion/jda/api/entities/GuildVoiceState.java index 2066653572..4b86af2c01 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/GuildVoiceState.java +++ b/src/main/java/net/dv8tion/jda/api/entities/GuildVoiceState.java @@ -17,6 +17,9 @@ package net.dv8tion.jda.api.entities; import net.dv8tion.jda.api.JDA; +import net.dv8tion.jda.api.entities.channel.concrete.StageChannel; +import net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel; +import net.dv8tion.jda.api.entities.channel.middleman.AudioChannel; import net.dv8tion.jda.api.requests.RestAction; import javax.annotation.CheckReturnValue; @@ -87,7 +90,7 @@ public interface GuildVoiceState extends ISnowflake /** * Returns true if this {@link net.dv8tion.jda.api.entities.Member Member} is unable to speak because the * channel is actively suppressing audio communication. This occurs in - * {@link net.dv8tion.jda.api.entities.VoiceChannel VoiceChannels} where the Member either doesn't have + * {@link VoiceChannel VoiceChannels} where the Member either doesn't have * {@link net.dv8tion.jda.api.Permission#VOICE_SPEAK Permission#VOICE_SPEAK} or if the channel is the * designated AFK channel. *
This is also used by {@link StageChannel StageChannels} for listeners without speaker approval. @@ -114,9 +117,9 @@ public interface GuildVoiceState extends ISnowflake boolean isSendingVideo(); /** - * Returns the current {@link net.dv8tion.jda.api.entities.AudioChannel AudioChannel} that the {@link net.dv8tion.jda.api.entities.Member Member} + * Returns the current {@link net.dv8tion.jda.api.entities.channel.middleman.AudioChannel AudioChannel} that the {@link net.dv8tion.jda.api.entities.Member Member} * is in. If the {@link net.dv8tion.jda.api.entities.Member Member} is currently not in a - * {@link net.dv8tion.jda.api.entities.AudioChannel AudioChannel}, this returns null. + * {@link net.dv8tion.jda.api.entities.channel.middleman.AudioChannel AudioChannel}, this returns null. * * @return The AudioChannel that the Member is in, or null. */ @@ -142,11 +145,11 @@ public interface GuildVoiceState extends ISnowflake Member getMember(); /** - * Used to determine if the {@link net.dv8tion.jda.api.entities.Member Member} is currently in an {@link net.dv8tion.jda.api.entities.AudioChannel AudioChannel} + * Used to determine if the {@link net.dv8tion.jda.api.entities.Member Member} is currently in an {@link net.dv8tion.jda.api.entities.channel.middleman.AudioChannel AudioChannel} * in the {@link net.dv8tion.jda.api.entities.Guild Guild} returned from {@link #getGuild() getGuild()}.
* If this is {@code false}, {@link #getChannel() getChannel()} will return {@code null}. * - * @return True, if the {@link net.dv8tion.jda.api.entities.Member Member} is currently in a {@link net.dv8tion.jda.api.entities.AudioChannel AudioChannel} + * @return True, if the {@link net.dv8tion.jda.api.entities.Member Member} is currently in a {@link net.dv8tion.jda.api.entities.channel.middleman.AudioChannel AudioChannel} * in this {@link net.dv8tion.jda.api.entities.Guild Guild}. */ boolean inAudioChannel(); diff --git a/src/main/java/net/dv8tion/jda/api/entities/IPermissionHolder.java b/src/main/java/net/dv8tion/jda/api/entities/IPermissionHolder.java index e1bdf3d8cb..0202b39f75 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/IPermissionHolder.java +++ b/src/main/java/net/dv8tion/jda/api/entities/IPermissionHolder.java @@ -17,6 +17,8 @@ package net.dv8tion.jda.api.entities; import net.dv8tion.jda.api.Permission; +import net.dv8tion.jda.api.entities.channel.attribute.IPermissionContainer; +import net.dv8tion.jda.api.entities.channel.middleman.GuildChannel; import net.dv8tion.jda.internal.utils.Checks; import javax.annotation.Nonnull; @@ -188,7 +190,7 @@ default boolean hasAccess(@Nonnull GuildChannel channel) * @param targetChannel * The target channel to check * @param syncSource - * The sync source, for example the parent category (see {@link ICategorizableChannel#getParentCategory()}) + * The sync source, for example the parent category (see {@link net.dv8tion.jda.api.entities.channel.attribute.ICategorizableChannel#getParentCategory()}) * * @throws IllegalArgumentException * If either of the channels is null or not from the same guild as this permission holder 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 af4d0eb9c9..9ced26ed0c 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/Invite.java +++ b/src/main/java/net/dv8tion/jda/api/entities/Invite.java @@ -18,6 +18,7 @@ import net.dv8tion.jda.api.JDA; import net.dv8tion.jda.api.entities.Guild.VerificationLevel; +import net.dv8tion.jda.api.entities.channel.ChannelType; import net.dv8tion.jda.api.requests.RestAction; import net.dv8tion.jda.api.requests.restaction.AuditableRestAction; import net.dv8tion.jda.api.utils.ImageProxy; @@ -41,7 +42,7 @@ * @see #resolve(JDA, String, boolean) * * @see net.dv8tion.jda.api.entities.Guild#retrieveInvites() Guild.retrieveInvites() - * @see IInviteContainer#retrieveInvites() + * @see net.dv8tion.jda.api.entities.channel.attribute.IInviteContainer#retrieveInvites() */ public interface Invite { @@ -297,7 +298,7 @@ default String getUrl() * Whether this Invite is expanded or not. Expanded invites contain more information, but they can only be * obtained by {@link net.dv8tion.jda.api.entities.Guild#retrieveInvites() Guild#retrieveInvites()} (requires * {@link net.dv8tion.jda.api.Permission#MANAGE_SERVER Permission.MANAGE_SERVER}) or - * {@link IInviteContainer#retrieveInvites() IInviteContainer#retrieveInvites()} (requires + * {@link net.dv8tion.jda.api.entities.channel.attribute.IInviteContainer#retrieveInvites() IInviteContainer#retrieveInvites()} (requires * {@link net.dv8tion.jda.api.Permission#MANAGE_CHANNEL Permission.MANAGE_CHANNEL}). * *

There is a convenience method {@link #expand()} to get the expanded invite for an unexpanded one. @@ -339,8 +340,8 @@ interface Channel extends ISnowflake String getName(); /** - * The {@link net.dv8tion.jda.api.entities.ChannelType ChannelType} of this channel. - *
Valid values are only {@link net.dv8tion.jda.api.entities.ChannelType#TEXT TEXT} or {@link net.dv8tion.jda.api.entities.ChannelType#VOICE VOICE} + * The {@link ChannelType ChannelType} of this channel. + *
Valid values are only {@link ChannelType#TEXT TEXT} or {@link ChannelType#VOICE VOICE} * * @return The channel's type */ diff --git a/src/main/java/net/dv8tion/jda/api/entities/Mentions.java b/src/main/java/net/dv8tion/jda/api/entities/Mentions.java index aff7dddb06..8ac0704183 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/Mentions.java +++ b/src/main/java/net/dv8tion/jda/api/entities/Mentions.java @@ -17,6 +17,8 @@ package net.dv8tion.jda.api.entities; import net.dv8tion.jda.api.JDA; +import net.dv8tion.jda.api.entities.channel.concrete.PrivateChannel; +import net.dv8tion.jda.api.entities.channel.middleman.GuildChannel; import net.dv8tion.jda.api.entities.emoji.CustomEmoji; import org.apache.commons.collections4.Bag; @@ -90,7 +92,7 @@ public interface Mentions Bag getUsersBag(); /** - * An immutable list of all mentioned {@link net.dv8tion.jda.api.entities.GuildChannel GuildChannels}. + * An immutable list of all mentioned {@link net.dv8tion.jda.api.entities.channel.middleman.GuildChannel GuildChannels}. *
If none were mentioned, this list is empty. Elements are sorted in order of appearance. * *

This may include GuildChannels from other {@link net.dv8tion.jda.api.entities.Guild Guilds} @@ -132,7 +134,7 @@ public interface Mentions Bag getChannelsBag(); /** - * An immutable list of all mentioned {@link net.dv8tion.jda.api.entities.GuildChannel GuildChannels} of type {@code clazz}. + * An immutable list of all mentioned {@link net.dv8tion.jda.api.entities.channel.middleman.GuildChannel GuildChannels} of type {@code clazz}. *
If none were mentioned, this list is empty. Elements are sorted in order of appearance. * *

This may include GuildChannels from other {@link net.dv8tion.jda.api.entities.Guild Guilds} diff --git a/src/main/java/net/dv8tion/jda/api/entities/Message.java b/src/main/java/net/dv8tion/jda/api/entities/Message.java index 4803ab60d0..1488a5ab32 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/Message.java +++ b/src/main/java/net/dv8tion/jda/api/entities/Message.java @@ -19,6 +19,10 @@ import net.dv8tion.jda.annotations.ReplaceWith; import net.dv8tion.jda.api.JDA; import net.dv8tion.jda.api.Permission; +import net.dv8tion.jda.api.entities.channel.ChannelType; +import net.dv8tion.jda.api.entities.channel.concrete.*; +import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel; +import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel; import net.dv8tion.jda.api.entities.channel.unions.GuildMessageChannelUnion; import net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion; import net.dv8tion.jda.api.entities.emoji.CustomEmoji; @@ -71,7 +75,7 @@ /** * Represents a Text message received from Discord. - *
This represents messages received from {@link net.dv8tion.jda.api.entities.MessageChannel MessageChannels}. + *
This represents messages received from {@link net.dv8tion.jda.api.entities.channel.middleman.MessageChannel MessageChannels}. * *

This type is not updated. JDA does not keep track of changes to messages, it is advised to do this via events such * as {@link net.dv8tion.jda.api.events.message.MessageUpdateEvent MessageUpdateEvent} and similar. @@ -298,7 +302,7 @@ default Message getReferencedMessage() /** * The {@link Mentions} used in this message. * - *

This includes {@link Member Members}, {@link GuildChannel GuildChannels}, {@link Role Roles}, and {@link CustomEmoji CustomEmojis}. + *

This includes {@link Member Members}, {@link net.dv8tion.jda.api.entities.channel.middleman.GuildChannel GuildChannels}, {@link Role Roles}, and {@link CustomEmoji CustomEmojis}. * Can also be used to check if a message mentions {@code @everyone} or {@code @here}. * *

Example
@@ -344,7 +348,7 @@ default Message getReferencedMessage() *
You can check the type of channel this message was sent from using {@link #isFromType(ChannelType)} or {@link #getChannelType()}. * *

Discord does not provide a member object for messages returned by {@link RestAction RestActions} of any kind. - * This will return null if the message was retrieved through {@link MessageChannel#retrieveMessageById(long)} or similar means, + * This will return null if the message was retrieved through {@link net.dv8tion.jda.api.entities.channel.middleman.MessageChannel#retrieveMessageById(long)} or similar means, * unless the member is already cached. * * @return Message author, or {@code null} if the message was not sent in a GuildMessageChannel, or if the message was sent by a Webhook. @@ -371,7 +375,7 @@ default Message getReferencedMessage() *

This includes resolving: *
{@link User Users} / {@link net.dv8tion.jda.api.entities.Member Members} * to their @Username/@Nickname format, - *
{@link net.dv8tion.jda.api.entities.GuildChannel GuildChannels} to their #ChannelName format, + *
{@link net.dv8tion.jda.api.entities.channel.middleman.GuildChannel GuildChannels} to their #ChannelName format, *
{@link net.dv8tion.jda.api.entities.Role Roles} to their @RoleName format *
{@link CustomEmoji Custom Emojis} (not unicode emojis!) to their {@code :name:} format. * @@ -438,15 +442,15 @@ default Message getReferencedMessage() String getNonce(); /** - * Used to determine if this Message was received from a {@link net.dv8tion.jda.api.entities.MessageChannel MessageChannel} - * of the {@link net.dv8tion.jda.api.entities.ChannelType ChannelType} specified. + * Used to determine if this Message was received from a {@link MessageChannel} + * of the {@link net.dv8tion.jda.api.entities.channel.ChannelType ChannelType} specified. * *

Useful for restricting functionality to a certain type of channels. * * @param type - * The {@link net.dv8tion.jda.api.entities.ChannelType ChannelType} to check against. + * The {@link ChannelType ChannelType} to check against. * - * @return True if the {@link net.dv8tion.jda.api.entities.ChannelType ChannelType} which this message was received + * @return True if the {@link net.dv8tion.jda.api.entities.channel.ChannelType ChannelType} which this message was received * from is the same as the one specified by {@code type}. */ boolean isFromType(@Nonnull ChannelType type); @@ -463,7 +467,7 @@ default boolean isFromGuild() } /** - * Gets the {@link net.dv8tion.jda.api.entities.ChannelType ChannelType} that this message was received from. + * Gets the {@link net.dv8tion.jda.api.entities.channel.ChannelType ChannelType} that this message was received from. * * @return The ChannelType which this message was received from. */ @@ -480,7 +484,7 @@ default boolean isFromGuild() boolean isWebhookMessage(); /** - * Returns the {@link net.dv8tion.jda.api.entities.MessageChannel MessageChannel} that this message was sent in. + * Returns the {@link net.dv8tion.jda.api.entities.channel.middleman.MessageChannel MessageChannel} that this message was sent in. * * @return The MessageChannel of this Message */ @@ -488,7 +492,7 @@ default boolean isFromGuild() MessageChannelUnion getChannel(); /** - * Returns the {@link net.dv8tion.jda.api.entities.GuildMessageChannel GuildMessageChannel} that this message was sent in + * Returns the {@link net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel GuildMessageChannel} that this message was sent in * if it was sent in a Guild. * * @throws java.lang.IllegalStateException @@ -500,23 +504,23 @@ default boolean isFromGuild() GuildMessageChannelUnion getGuildChannel(); /** - * The {@link net.dv8tion.jda.api.entities.Category Category} this + * The {@link Category Category} this * message was sent in. This will always be {@code null} for DMs. - *
Equivalent to {@code getGuildChannel().getParentCategory()} if this was sent in a {@link GuildMessageChannel}. + *
Equivalent to {@code getGuildChannel().getParentCategory()} if this was sent in a {@link net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel}. * - * @return {@link net.dv8tion.jda.api.entities.Category Category} for this message + * @return {@link net.dv8tion.jda.api.entities.channel.concrete.Category Category} for this message */ @Nullable Category getCategory(); /** * Returns the {@link net.dv8tion.jda.api.entities.Guild Guild} that this message was sent in. - *
This is just a shortcut to {@link #getGuildChannel()}{@link net.dv8tion.jda.api.entities.GuildChannel#getGuild() .getGuild()}. + *
This is just a shortcut to {@link #getGuildChannel()}{@link net.dv8tion.jda.api.entities.channel.middleman.GuildChannel#getGuild() .getGuild()}. *
This is only valid if the Message was actually sent in a GuildMessageChannel. *
You can check the type of channel this message was sent from using {@link #isFromType(ChannelType)} or {@link #getChannelType()}. * * @throws java.lang.IllegalStateException - * If this was not sent in a {@link net.dv8tion.jda.api.entities.GuildChannel}. + * If this was not sent in a {@link net.dv8tion.jda.api.entities.channel.middleman.GuildChannel}. * * @return The Guild this message was sent in * @@ -695,7 +699,7 @@ default List