Skip to content

Commit 357d839

Browse files
Fix some minor issues in message history docs (#2951)
1 parent 26d1fbc commit 357d839

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

src/main/java/net/dv8tion/jda/api/entities/MessageHistory.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,10 @@ public Message getMessageById(long id)
375375
* <br>{@code MessageHistory history = MessageHistory.getHistoryAfter(channel, messageId).limit(60).complete()}
376376
* <br>Will return a MessageHistory instance with the first 60 messages sent after the provided message ID.
377377
*
378-
* <p>Alternatively you can provide an epoch millisecond timestamp using {@link TimeUtil#getDiscordTimestamp(long) MiscUtil.getDiscordTimestamp(long)}:
378+
* <p>Alternatively you can provide an epoch millisecond timestamp using {@link TimeUtil#getDiscordTimestamp(long)}:
379379
* <br><pre><code>
380380
* long timestamp = System.currentTimeMillis(); // or any other epoch millis timestamp
381-
* String discordTimestamp = Long.toUnsignedString(MiscUtil.getDiscordTimestamp(timestamp));
381+
* String discordTimestamp = Long.toUnsignedString(TimeUtil.getDiscordTimestamp(timestamp));
382382
* MessageHistory history = MessageHistory.getHistoryAfter(channel, discordTimestamp).complete();
383383
* </code></pre>
384384
*
@@ -420,10 +420,10 @@ public static MessageRetrieveAction getHistoryAfter(@Nonnull MessageChannel chan
420420
* <br>{@code MessageHistory history = MessageHistory.getHistoryBefore(channel, messageId).limit(60).complete()}
421421
* <br>Will return a MessageHistory instance with the first 60 messages sent before the provided message ID.
422422
*
423-
* <p>Alternatively you can provide an epoch millisecond timestamp using {@link TimeUtil#getDiscordTimestamp(long) MiscUtil.getDiscordTimestamp(long)}:
423+
* <p>Alternatively you can provide an epoch millisecond timestamp using {@link TimeUtil#getDiscordTimestamp(long)}:
424424
* <br><pre><code>
425425
* long timestamp = System.currentTimeMillis(); // or any other epoch millis timestamp
426-
* String discordTimestamp = Long.toUnsignedString(MiscUtil.getDiscordTimestamp(timestamp));
426+
* String discordTimestamp = Long.toUnsignedString(TimeUtil.getDiscordTimestamp(timestamp));
427427
* MessageHistory history = MessageHistory.getHistoryBefore(channel, discordTimestamp).complete();
428428
* </code></pre>
429429
*
@@ -465,10 +465,10 @@ public static MessageRetrieveAction getHistoryBefore(@Nonnull MessageChannel cha
465465
* <br>{@code MessageHistory history = MessageHistory.getHistoryAround(channel, messageId).limit(60).complete()}
466466
* <br>Will return a MessageHistory instance with the first 60 messages sent around the provided message ID.
467467
*
468-
* <p>Alternatively you can provide an epoch millisecond timestamp using {@link TimeUtil#getDiscordTimestamp(long) MiscUtil.getDiscordTimestamp(long)}:
468+
* <p>Alternatively you can provide an epoch millisecond timestamp using {@link TimeUtil#getDiscordTimestamp(long)}:
469469
* <br><pre><code>
470470
* long timestamp = System.currentTimeMillis(); // or any other epoch millis timestamp
471-
* String discordTimestamp = Long.toUnsignedString(MiscUtil.getDiscordTimestamp(timestamp));
471+
* String discordTimestamp = Long.toUnsignedString(TimeUtil.getDiscordTimestamp(timestamp));
472472
* MessageHistory history = MessageHistory.getHistoryAround(channel, discordTimestamp).complete();
473473
* </code></pre>
474474
*

src/main/java/net/dv8tion/jda/api/entities/channel/middleman/MessageChannel.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,7 @@ default MessagePaginationAction getIterableHistory()
13011301
* @param messageId
13021302
* The id of the message that will act as a marker.
13031303
* @param limit
1304-
* The amount of messages to be retrieved around the marker. Minimum: 1, Max: 100.
1304+
* The amount of messages to be retrieved. Minimum: 1, Max: 100.
13051305
*
13061306
* @throws java.lang.IllegalArgumentException
13071307
* <ul>
@@ -1369,7 +1369,7 @@ default MessageHistory.MessageRetrieveAction getHistoryAround(@Nonnull String me
13691369
* @param messageId
13701370
* The id of the message that will act as a marker. The id must refer to a message from this MessageChannel.
13711371
* @param limit
1372-
* The amount of messages to be retrieved around the marker. Minimum: 1, Max: 100.
1372+
* The amount of messages to be retrieved. Minimum: 1, Max: 100.
13731373
*
13741374
* @throws java.lang.IllegalArgumentException
13751375
* <ul>
@@ -1437,7 +1437,7 @@ default MessageHistory.MessageRetrieveAction getHistoryAround(long messageId, in
14371437
* The {@link net.dv8tion.jda.api.entities.Message Message} that will act as a marker. The provided Message
14381438
* must be from this MessageChannel.
14391439
* @param limit
1440-
* The amount of messages to be retrieved around the marker. Minimum: 1, Max: 100.
1440+
* The amount of messages to be retrieved. Minimum: 1, Max: 100.
14411441
*
14421442
* @throws java.lang.IllegalArgumentException
14431443
* <ul>
@@ -1498,7 +1498,7 @@ default MessageHistory.MessageRetrieveAction getHistoryAround(@Nonnull Message m
14981498
* @param messageId
14991499
* The id of the message that will act as a marker.
15001500
* @param limit
1501-
* The amount of messages to be retrieved after the marker. Minimum: 1, Max: 100.
1501+
* The amount of messages to be retrieved. Minimum: 1, Max: 100.
15021502
*
15031503
* @throws java.lang.IllegalArgumentException
15041504
* <ul>
@@ -1558,7 +1558,7 @@ default MessageHistory.MessageRetrieveAction getHistoryAfter(@Nonnull String mes
15581558
* @param messageId
15591559
* The id of the message that will act as a marker.
15601560
* @param limit
1561-
* The amount of messages to be retrieved after the marker. Minimum: 1, Max: 100.
1561+
* The amount of messages to be retrieved. Minimum: 1, Max: 100.
15621562
*
15631563
* @throws java.lang.IllegalArgumentException
15641564
* Provided {@code limit} is less than {@code 1} or greater than {@code 100}.
@@ -1615,7 +1615,7 @@ default MessageHistory.MessageRetrieveAction getHistoryAfter(long messageId, int
16151615
* @param message
16161616
* The message that will act as a marker.
16171617
* @param limit
1618-
* The amount of messages to be retrieved after the marker. Minimum: 1, Max: 100.
1618+
* The amount of messages to be retrieved. Minimum: 1, Max: 100.
16191619
*
16201620
* @throws java.lang.IllegalArgumentException
16211621
* <ul>
@@ -1676,7 +1676,7 @@ default MessageHistory.MessageRetrieveAction getHistoryAfter(@Nonnull Message me
16761676
* @param messageId
16771677
* The id of the message that will act as a marker.
16781678
* @param limit
1679-
* The amount of messages to be retrieved after the marker. Minimum: 1, Max: 100.
1679+
* The amount of messages to be retrieved. Minimum: 1, Max: 100.
16801680
*
16811681
* @throws java.lang.IllegalArgumentException
16821682
* <ul>
@@ -1736,7 +1736,7 @@ default MessageHistory.MessageRetrieveAction getHistoryBefore(@Nonnull String me
17361736
* @param messageId
17371737
* The id of the message that will act as a marker.
17381738
* @param limit
1739-
* The amount of messages to be retrieved after the marker. Minimum: 1, Max: 100.
1739+
* The amount of messages to be retrieved. Minimum: 1, Max: 100.
17401740
*
17411741
* @throws java.lang.IllegalArgumentException
17421742
* <ul>
@@ -1771,7 +1771,7 @@ default MessageHistory.MessageRetrieveAction getHistoryBefore(long messageId, in
17711771
* <p><b>Examples:</b>
17721772
* <br>Retrieve 100 messages from the middle of history. {@literal >}100 message exist in history and the marker is {@literal >}50 messages
17731773
* from the edge of history.
1774-
* <br>{@code getHistoryAfter(message, 100)} - This will retrieve 100 messages from history sent before the marker.
1774+
* <br>{@code getHistoryBefore(message, 100)} - This will retrieve 100 messages from history sent before the marker.
17751775
*
17761776
* <p>The following {@link net.dv8tion.jda.api.requests.ErrorResponse ErrorResponses} are possible:
17771777
* <ul>
@@ -1796,7 +1796,7 @@ default MessageHistory.MessageRetrieveAction getHistoryBefore(long messageId, in
17961796
* @param message
17971797
* The message that will act as a marker.
17981798
* @param limit
1799-
* The amount of messages to be retrieved after the marker. Minimum: 1, Max: 100.
1799+
* The amount of messages to be retrieved. Minimum: 1, Max: 100.
18001800
*
18011801
* @throws java.lang.IllegalArgumentException
18021802
* <ul>

0 commit comments

Comments
 (0)