Skip to content

Commit 1992063

Browse files
committed
Update to JDA 5.0.0-alpha.11
This moves us back to official JDA releases.
1 parent 8a3a614 commit 1992063

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

gradle/libs.versions.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ lombok = { id = "io.freefair.lombok", version = "6.4.3" }
66
launch4j = { id = 'edu.sc.seis.launch4j', version = '2.5.2'}
77

88
[versions]
9-
# jda = "5.0.0-alpha.9"
10-
# https://github.com/DV8FromTheWorld/JDA/commit/5492a76bceb85ba42c3c2c75f5aa84ab73a92f61
11-
jda = "5492a76bce"
9+
jda = "5.0.0-alpha.11"
1210
# https://github.com/Matyrobbrt/JDA-Chewtils/commit/252809f87422562223b7d1af571af75d819f5a65
1311
# chewtils = "2.0-SNAPSHOT"
1412
chewtils = "252809f"
@@ -41,9 +39,7 @@ urldetector = "0.1.23"
4139
mockito = "4.5.1"
4240

4341
[libraries]
44-
# jda = { module = "net.dv8tion:JDA", version.ref = "jda" }
45-
# TODO: Switch to JDA releases once alpha.11 (with modals) is released
46-
jda = { module = "com.github.DV8FromTheWorld:JDA", version.ref = "jda" }
42+
jda = { module = "net.dv8tion:JDA", version.ref = "jda" }
4743
# TODO switch back when JDA-Chewtils/PR 65 is merged
4844
# chewtils = { module = "pw.chew:jda-chewtils", version.ref = "chewtils" }
4945
chewtils = { module = "com.matyrobbrt:JDA-Chewtils", version.ref = "chewtils" }

src/commander/java/com/mcmoddev/mmdbot/commander/commands/CommunityChannelCommand.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import com.mcmoddev.mmdbot.commander.config.GuildConfiguration;
2929
import net.dv8tion.jda.api.MessageBuilder;
3030
import net.dv8tion.jda.api.Permission;
31-
import net.dv8tion.jda.api.entities.Emote;
3231
import net.dv8tion.jda.api.entities.GuildChannel;
3332
import net.dv8tion.jda.api.entities.Member;
3433
import net.dv8tion.jda.api.entities.Message;
@@ -40,11 +39,9 @@
4039
import java.util.ArrayList;
4140
import java.util.Comparator;
4241
import java.util.EnumSet;
43-
import java.util.Formatter;
4442
import java.util.List;
4543
import java.util.Objects;
4644
import java.util.Set;
47-
import java.util.stream.Collectors;
4845

4946
/**
5047
* Create a community channel owned by the specified user.
@@ -135,7 +132,7 @@ protected void execute(final SlashCommandEvent event) {
135132
.flatMap(ch -> category.modifyTextChannelPositions()
136133
.sortOrder(Comparator.comparing(GuildChannel::getName))
137134
.map($ -> ch))
138-
.flatMap(ch -> ch.putPermissionOverride(user).setAllow(ownerPermissions).map($ -> ch))
135+
.flatMap(ch -> ch.upsertPermissionOverride(user).setAllowed(ownerPermissions).map($ -> ch))
139136
.flatMap(ch -> ch.sendMessage(new MessageBuilder()
140137
.append(formatMessage(
141138
guildCfg.getChannelCreatedMessage(),

0 commit comments

Comments
 (0)