Skip to content

Commit 3ea40dc

Browse files
nltbeeTais993
authored andcommitted
Upgrade JDA to alpha 9
1 parent 98d7a9a commit 3ea40dc

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
@@ -65,9 +65,7 @@ public static void sendErrorMessage(@NotNull IReplyCallback interaction,
6565
* @return the id of the latest message or empty if it could not be retrieved.
6666
*/
6767
public static @NotNull OptionalLong getLastMessageId(@NotNull TextChannel channel) {
68-
if (channel.hasLatestMessage()) {
69-
return OptionalLong.of(channel.getLatestMessageIdLong());
70-
}
68+
7169
// black magic to convert Optional<Long> into OptionalLong because Optional does not have
7270
// .mapToLong
7371
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
@@ -106,7 +106,7 @@ public JdaTester() {
106106
Member selfMember = spy(new MemberImpl(guild, selfUser));
107107
member = spy(new MemberImpl(guild, user));
108108
textChannel = spy(new TextChannelImpl(TEXT_CHANNEL_ID, guild));
109-
privateChannel = spy(new PrivateChannelImpl(PRIVATE_CHANNEL_ID, user));
109+
privateChannel = spy(new PrivateChannelImpl(jda, PRIVATE_CHANNEL_ID, user));
110110
messageAction = mock(MessageActionImpl.class);
111111
EntityBuilder entityBuilder = mock(EntityBuilder.class);
112112
Role everyoneRole = new RoleImpl(GUILD_ID, guild);

0 commit comments

Comments
 (0)