Skip to content

Commit 27c7d19

Browse files
Version Bump & Cleanup
1 parent 43035db commit 27c7d19

File tree

14 files changed

+13
-378
lines changed

14 files changed

+13
-378
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ plugins {
2828
id 'com.github.johnrengelman.shadow' version '2.0.1'
2929
}
3030

31-
def versionObj = new Version(major: 3, minor: 4, revision: 0)
31+
def versionObj = new Version(major: 3, minor: 5, revision: 0)
3232

3333
group = "net.dv8tion"
3434
archivesBaseName = "JDA"

src/main/java/net/dv8tion/jda/bot/sharding/DefaultShardManagerBuilder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,8 @@ public DefaultShardManagerBuilder setEventManager(final IEventManager manager)
358358
* <br>This value can be changed at any time in the {@link net.dv8tion.jda.core.managers.Presence Presence} from a JDA instance.
359359
*
360360
* <p><b>Hint:</b> You can create a {@link net.dv8tion.jda.core.entities.Game Game} object using
361-
* {@link net.dv8tion.jda.core.entities.Game#of(String) Game.of(String)} or
362-
* {@link net.dv8tion.jda.core.entities.Game#of(String, String) Game.of(String, String)}.
361+
* {@link net.dv8tion.jda.core.entities.Game#playing(String) Game.playing(String)} or
362+
* {@link net.dv8tion.jda.core.entities.Game#streaming(String, String)} Game.streaming(String, String)}.
363363
*
364364
* @param game
365365
* An instance of {@link net.dv8tion.jda.core.entities.Game Game} (null allowed)
@@ -378,8 +378,8 @@ public DefaultShardManagerBuilder setGame(final Game game)
378378
* <br>This value can be changed at any time in the {@link net.dv8tion.jda.core.managers.Presence Presence} from a JDA instance.
379379
*
380380
* <p><b>Hint:</b> You can create a {@link net.dv8tion.jda.core.entities.Game Game} object using
381-
* {@link net.dv8tion.jda.core.entities.Game#of(String) Game.of(String)} or
382-
* {@link net.dv8tion.jda.core.entities.Game#of(String, String) Game.of(String, String)}.
381+
* {@link net.dv8tion.jda.core.entities.Game#playing(String) Game.playing(String)} or
382+
* {@link net.dv8tion.jda.core.entities.Game#streaming(String, String) Game.streaming(String, String)}.
383383
*
384384
* @param gameProvider
385385
* An instance of {@link net.dv8tion.jda.core.entities.Game Game} (null allowed)

src/main/java/net/dv8tion/jda/bot/sharding/ShardManager.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -761,16 +761,16 @@ default List<VoiceChannel> getVoiceChannels()
761761

762762
/**
763763
* Sets the {@link net.dv8tion.jda.core.entities.Game Game} for all shards.
764-
* <br>A Game can be retrieved via {@link net.dv8tion.jda.core.entities.Game#of(String)}.
764+
* <br>A Game can be retrieved via {@link net.dv8tion.jda.core.entities.Game#playing(String)}.
765765
* For streams you provide a valid streaming url as second parameter.
766766
*
767767
* <p>This will also change the game for shards that are created in the future.
768768
*
769769
* @param game
770770
* A {@link net.dv8tion.jda.core.entities.Game Game} instance or null to reset
771771
*
772-
* @see net.dv8tion.jda.core.entities.Game#of(String)
773-
* @see net.dv8tion.jda.core.entities.Game#of(String, String)
772+
* @see net.dv8tion.jda.core.entities.Game#playing(String)
773+
* @see net.dv8tion.jda.core.entities.Game#streaming(String, String)
774774
*/
775775
default void setGame(final Game game)
776776
{
@@ -779,16 +779,16 @@ default void setGame(final Game game)
779779

780780
/**
781781
* Sets provider that provider the {@link net.dv8tion.jda.core.entities.Game Game} for all shards.
782-
* <br>A Game can be retrieved via {@link net.dv8tion.jda.core.entities.Game#of(String)}.
782+
* <br>A Game can be retrieved via {@link net.dv8tion.jda.core.entities.Game#playing(String)}.
783783
* For streams you provide a valid streaming url as second parameter.
784784
*
785785
* <p>This will also change the provider for shards that are created in the future.
786786
*
787787
* @param gameProvider
788788
* A {@link net.dv8tion.jda.core.entities.Game Game} instance or null to reset
789789
*
790-
* @see net.dv8tion.jda.core.entities.Game#of(String)
791-
* @see net.dv8tion.jda.core.entities.Game#of(String, String)
790+
* @see net.dv8tion.jda.core.entities.Game#playing(String)
791+
* @see net.dv8tion.jda.core.entities.Game#streaming(String, String)
792792
*/
793793
default void setGameProvider(final IntFunction<Game> gameProvider)
794794
{

src/main/java/net/dv8tion/jda/client/events/message/group/GenericGroupMessageEvent.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,30 +40,4 @@ public long getMessageIdLong()
4040
{
4141
return messageId;
4242
}
43-
44-
@Deprecated
45-
public boolean isFromType(ChannelType type)
46-
{
47-
return group.getType() == type;
48-
}
49-
50-
@Deprecated
51-
public ChannelType getChannelType()
52-
{
53-
return group.getType();
54-
}
55-
56-
/**
57-
* The {@link net.dv8tion.jda.client.entities.Group Group}
58-
*
59-
* @return The {@link net.dv8tion.jda.client.entities.Group Group}
60-
*
61-
* @deprecated
62-
* Use {@link #getGroup()} instead
63-
*/
64-
@Deprecated
65-
public Group getChannel()
66-
{
67-
return getGroup();
68-
}
6943
}

src/main/java/net/dv8tion/jda/core/MessageBuilder.java

Lines changed: 0 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -359,27 +359,6 @@ public boolean isEmpty() {
359359
return builder.length() == 0 && embed == null;
360360
}
361361

362-
/**
363-
* Replaces each substring that matches the target string with the specified replacement string.
364-
* The replacement proceeds from the beginning of the string to the end, for example, replacing
365-
* "aa" with "b" in the message "aaa" will result in "ba" rather than "ab".
366-
*
367-
* @param target
368-
* the sequence of char values to be replaced
369-
* @param replacement
370-
* the replacement sequence of char values
371-
*
372-
* @return The MessageBuilder instance. Useful for chaining.
373-
*
374-
* @deprecated
375-
* Deprecated in favor to {@link #replace(String, String)} due to clearer naming (not using regex)
376-
*/
377-
@Deprecated
378-
public MessageBuilder replaceAll(String target, String replacement)
379-
{
380-
return replace(target, replacement);
381-
}
382-
383362
/**
384363
* Replaces each substring that matches the target string with the specified replacement string.
385364
* The replacement proceeds from the beginning of the string to the end, for example, replacing
@@ -499,33 +478,6 @@ public MessageBuilder stripMentions(Guild guild, Message.MentionType... types)
499478
return this.stripMentions(guild.getJDA(), guild, types);
500479
}
501480

502-
/**
503-
* Removes all mentions of the specified types and replaces them with the closest looking textual representation.
504-
*
505-
* <p>Use this over {@link #stripMentions(JDA, Message.MentionType...)} if {@link net.dv8tion.jda.core.entities.User User} mentions should
506-
* be replaced with their nicknames in a specific guild based.
507-
* <br>Uses {@link net.dv8tion.jda.core.entities.Member#getEffectiveName()}
508-
*
509-
* @param guild
510-
* the guild for {@link net.dv8tion.jda.core.entities.User User} mentions
511-
* @param types
512-
* the {@link MentionType MentionTypes} that should be stripped
513-
*
514-
* @return The MessageBuilder instance. Useful for chaining.
515-
*
516-
* @deprecated
517-
* Use {@link #stripMentions(Guild, Message.MentionType...)} instead.
518-
*/
519-
@Deprecated
520-
public MessageBuilder stripMentions(Guild guild, MentionType... types)
521-
{
522-
if (types == null) return this;
523-
Message.MentionType[] mentionTypes = new Message.MentionType[types.length];
524-
for (int i = 0; i < mentionTypes.length; i++)
525-
mentionTypes[i] = convertNewType(types[i]);
526-
return stripMentions(guild, mentionTypes);
527-
}
528-
529481
/**
530482
* Removes all mentions of the specified types and replaces them with the closest looking textual representation.
531483
*
@@ -544,32 +496,6 @@ public MessageBuilder stripMentions(JDA jda, Message.MentionType... types)
544496
return this.stripMentions(jda, null, types);
545497
}
546498

547-
/**
548-
* Removes all mentions of the specified types and replaces them with the closest looking textual representation.
549-
*
550-
* <p>Use this over {@link #stripMentions(Guild, Message.MentionType...)} if {@link net.dv8tion.jda.core.entities.User User}
551-
* mentions should be replaced with their {@link net.dv8tion.jda.core.entities.User#getName()}.
552-
*
553-
* @param jda
554-
* The JDA instance used to resolve the mentions.
555-
* @param types
556-
* the {@link MentionType MentionTypes} that should be stripped
557-
*
558-
* @return The MessageBuilder instance. Useful for chaining.
559-
*
560-
* @deprecated
561-
* Use {@link #stripMentions(JDA, Message.MentionType...)} instead
562-
*/
563-
@Deprecated
564-
public MessageBuilder stripMentions(JDA jda, MentionType... types)
565-
{
566-
if (types == null) return this;
567-
Message.MentionType[] mentionTypes = new Message.MentionType[types.length];
568-
for (int i = 0; i < mentionTypes.length; i++)
569-
mentionTypes[i] = convertNewType(types[i]);
570-
return stripMentions(jda, mentionTypes);
571-
}
572-
573499
private MessageBuilder stripMentions(JDA jda, Guild guild, Message.MentionType... types)
574500
{
575501
if (types == null)
@@ -1042,50 +968,6 @@ public int nextMessage(final int currentBeginIndex, final MessageBuilder builder
1042968
int nextMessage(int currentBeginIndex, MessageBuilder builder);
1043969
}
1044970

1045-
/**
1046-
* Holds the strippable mention types used in {@link MessageBuilder#stripMentions(JDA, MentionType...)}
1047-
* and {@link MessageBuilder#stripMentions(Guild, MentionType...)}
1048-
*
1049-
* @deprecated Getting replaced by {@link net.dv8tion.jda.core.entities.Message.MentionType Message.MentionType}
1050-
*/
1051-
@Deprecated
1052-
public enum MentionType {
1053-
/**
1054-
* <b>@everyone</b> mentions
1055-
*/
1056-
EVERYONE,
1057-
/**
1058-
* <b>@here</b> mentions
1059-
*/
1060-
HERE,
1061-
/**
1062-
* <b>@User</b> mentions
1063-
*/
1064-
USER,
1065-
/**
1066-
* <b>#channel</b> mentions
1067-
*/
1068-
CHANNEL,
1069-
/**
1070-
* <b>@Role</b> mentions
1071-
*/
1072-
ROLE
1073-
}
1074-
1075-
@Deprecated
1076-
private Message.MentionType convertNewType(MentionType oldType)
1077-
{
1078-
switch (oldType)
1079-
{
1080-
case HERE: return Message.MentionType.HERE;
1081-
case EVERYONE: return Message.MentionType.EVERYONE;
1082-
case ROLE: return Message.MentionType.ROLE;
1083-
case USER: return Message.MentionType.USER;
1084-
case CHANNEL: return Message.MentionType.CHANNEL;
1085-
default: return null;
1086-
}
1087-
}
1088-
1089971
/**
1090972
* Holds the available formatting used in {@link MessageBuilder#append(java.lang.CharSequence, net.dv8tion.jda.core.MessageBuilder.Formatting...)}
1091973
*/

src/main/java/net/dv8tion/jda/core/entities/Game.java

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -150,28 +150,6 @@ public static Game playing(String name)
150150
return new Game(name, null, GameType.DEFAULT);
151151
}
152152

153-
/**
154-
* Creates a new Game instance with the specified name.
155-
* <br>In order to appear as "streaming" in the official client you must
156-
* provide a valid (see documentation of method) streaming URL in {@link #streaming(String, String) Game.of(String, String)}.
157-
*
158-
* @param name
159-
* The not-null name of the newly created game
160-
*
161-
* @throws IllegalArgumentException
162-
* if the specified name is null, empty or blank
163-
*
164-
* @return A valid Game instance with the provided name with {@link GameType#DEFAULT}
165-
*
166-
* @deprecated
167-
* Use {@link #playing(String)} instead
168-
*/
169-
@Deprecated
170-
public static Game of(String name)
171-
{
172-
return playing(name);
173-
}
174-
175153
/**
176154
* Creates a new Game instance with the specified name and url.
177155
* <br>The specified URL must be valid according to discord standards in order to display as "streaming" in the official client.
@@ -200,32 +178,6 @@ public static Game streaming(String name, String url)
200178
return new Game(name, url, type);
201179
}
202180

203-
/**
204-
* Creates a new Game instance with the specified name and url.
205-
* <br>The specified URL must be valid according to discord standards in order to display as "streaming" in the official client.
206-
* A valid streaming URL must be derived from {@code https://twitch.tv/} and can be verified using {@link #isValidStreamingUrl(String)}. (see documentation)
207-
*
208-
* @param name
209-
* The not-null name of the newly created game
210-
* @param url
211-
* The streaming url to use, required to display as "streaming"
212-
*
213-
* @throws IllegalArgumentException
214-
* If the specified name is null or empty
215-
*
216-
* @return A valid Game instance with the provided name and url
217-
*
218-
* @see #isValidStreamingUrl(String)
219-
*
220-
* @deprecated
221-
* Use {@link #streaming(String, String)} instead!
222-
*/
223-
@Deprecated
224-
public static Game of(String name, String url)
225-
{
226-
return streaming(name, url);
227-
}
228-
229181
/**
230182
* Creates a new Game instance with the specified name.
231183
* <br>This will display as {@code Listening name} in the official client

src/main/java/net/dv8tion/jda/core/entities/Message.java

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -318,35 +318,6 @@ public interface Message extends ISnowflake, Formattable
318318
*/
319319
String getContentDisplay();
320320

321-
/**
322-
* The textual content of this message in the format that would be shown to the Discord client. All
323-
* {@link net.dv8tion.jda.core.entities.IMentionable IMentionable} entities will be resolved to the format
324-
* shown by the Discord client instead of the {@literal <id>} format.
325-
*
326-
* <p>This includes resolving:
327-
* <br>{@link net.dv8tion.jda.core.entities.User Users} / {@link net.dv8tion.jda.core.entities.Member Members}
328-
* to their @Username/@Nickname format,
329-
* <br>{@link net.dv8tion.jda.core.entities.TextChannel TextChannels} to their #ChannelName format,
330-
* <br>{@link net.dv8tion.jda.core.entities.Role Roles} to their @RoleName format
331-
* <br>{@link net.dv8tion.jda.core.entities.Emote Emotes} (not emojis!) to their {@code :name:} format.
332-
*
333-
* <p>If you want the actual Content (mentions as {@literal <@id>}), use {@link #getContentRaw()} instead
334-
*
335-
* @throws java.lang.UnsupportedOperationException
336-
* If this is not a Received Message from {@link net.dv8tion.jda.core.entities.MessageType#DEFAULT MessageType.DEFAULT}
337-
*
338-
* @return Output of {@link #getContentDisplay()}
339-
*
340-
* @deprecated
341-
* You may use {@link #getContentDisplay()} instead.
342-
* <br>This method will be removed due to ambiguous meanings and major confusion for newer users.
343-
*/
344-
@Deprecated
345-
default String getContent()
346-
{
347-
return getContentDisplay();
348-
}
349-
350321
/**
351322
* The raw textual content of this message. Does not resolve {@link net.dv8tion.jda.core.entities.IMentionable IMentionable}
352323
* entities like {@link #getContentDisplay()} does. This means that this is the completely raw textual content of the message
@@ -357,24 +328,6 @@ default String getContent()
357328
*/
358329
String getContentRaw();
359330

360-
/**
361-
* The raw textual content of this message. Does not resolve {@link net.dv8tion.jda.core.entities.IMentionable IMentionable}
362-
* entities like {@link #getContentDisplay()} does. This means that this is the completely raw textual content of the message
363-
* received from Discord and can contain mentions specified by
364-
* <a href="https://discordapp.com/developers/docs/resources/channel#message-formatting" target="_blank">Discord's Message Formatting</a>.
365-
*
366-
* @return The raw textual content of the message, containing unresolved Discord message formatting.
367-
*
368-
* @deprecated
369-
* You may use {@link #getContentRaw()} instead.
370-
* <br>This method will be removed due to ambiguous meanings and major confusion for newer users.
371-
*/
372-
@Deprecated
373-
default String getRawContent()
374-
{
375-
return getContentRaw();
376-
}
377-
378331
/**
379332
* Gets the textual content of this message using {@link #getContentDisplay()} and then strips it of all markdown characters
380333
* like {@literal *, **, __, ~~} that provide text formatting. Any characters that match these but are not being used
@@ -384,23 +337,6 @@ default String getRawContent()
384337
*/
385338
String getContentStripped();
386339

387-
/**
388-
* Gets the textual content of this message using {@link #getContentDisplay()} and then strips it of all markdown characters
389-
* like {@literal *, **, __, ~~} that provide text formatting. Any characters that match these but are not being used
390-
* for formatting are escaped to prevent possible formatting.
391-
*
392-
* @return The textual content from {@link #getContentDisplay()} with all text formatting characters removed or escaped.
393-
*
394-
* @deprecated
395-
* You may use {@link #getContentStripped()} instead.
396-
* <br>This method will be removed due to ambiguous meanings and major confusion for newer users.
397-
*/
398-
@Deprecated
399-
default String getStrippedContent()
400-
{
401-
return getContentStripped();
402-
}
403-
404340
/**
405341
* Creates an immutable List of {@link net.dv8tion.jda.core.entities.Invite Invite} codes
406342
* that are included in this Message.

0 commit comments

Comments
 (0)