Skip to content

Commit f78a63e

Browse files
nltbeenltbee
authored andcommitted
Upgrade JDA to alpha 9
1 parent 7eb7198 commit f78a63e

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

application/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ shadowJar {
4141
dependencies {
4242
implementation project(':database')
4343

44-
implementation 'net.dv8tion:JDA:5.0.0-alpha.5'
44+
implementation 'net.dv8tion:JDA:5.0.0-alpha.9'
4545

4646
implementation 'org.apache.logging.log4j:log4j-core:2.16.0'
4747
runtimeOnly 'org.apache.logging.log4j:log4j-slf4j18-impl:2.16.0'

application/src/main/java/org/togetherjava/tjbot/commands/free/FreeUtil.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ public static void sendErrorMessage(@NotNull IReplyCallback interaction, @NotNul
6464
* @return the id of the latest message or empty if it could not be retrieved.
6565
*/
6666
public static @NotNull OptionalLong getLastMessageId(@NotNull TextChannel channel) {
67-
if (channel.hasLatestMessage()) {
68-
return OptionalLong.of(channel.getLatestMessageIdLong());
69-
}
67+
7068
// black magic to convert Optional<Long> into OptionalLong because Optional does not have
7169
// .mapToLong
7270
return getChannelHistory(channel, 1).stream()

application/src/test/java/org/togetherjava/tjbot/jda/JdaTester.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public JdaTester() {
7777
GuildImpl guild = spy(new GuildImpl(jda, GUILD_ID));
7878
member = spy(new MemberImpl(guild, user));
7979
TextChannelImpl textChannel = spy(new TextChannelImpl(TEXT_CHANNEL_ID, guild));
80-
PrivateChannelImpl privateChannel = spy(new PrivateChannelImpl(PRIVATE_CHANNEL_ID, user));
80+
PrivateChannelImpl privateChannel = spy(new PrivateChannelImpl(jda, PRIVATE_CHANNEL_ID, user));
8181
MessageAction messageAction = mock(MessageActionImpl.class);
8282
EntityBuilder entityBuilder = mock(EntityBuilder.class);
8383

0 commit comments

Comments
 (0)