diff --git a/bot/build.gradle.kts b/bot/build.gradle.kts index e3bc8a0..da741e4 100644 --- a/bot/build.gradle.kts +++ b/bot/build.gradle.kts @@ -47,7 +47,7 @@ val kotlinX = "1.7.3" // https://mvnrepository.com/artifact/org.jetbrains.kotlin val kotlin = "1.9.21" val scrimage = "4.1.0" -val jda = "5.0.0-beta.20" +val jda = "5.0.0-beta.23" val kordEx = "1.6.8-SNAPSHOT" val kordKommons = "0.0.13-SNAPSHOT" val kandyVersion = "0.5.0" diff --git a/bot/src/main/kotlin/me/melijn/bot/commands/AttendanceExtension.kt b/bot/src/main/kotlin/me/melijn/bot/commands/AttendanceExtension.kt index 583c4a6..fb7b99b 100644 --- a/bot/src/main/kotlin/me/melijn/bot/commands/AttendanceExtension.kt +++ b/bot/src/main/kotlin/me/melijn/bot/commands/AttendanceExtension.kt @@ -80,14 +80,13 @@ class AttendanceExtension : Extension() { name = "attendance" description = "Manage attendance events" - requirePermission(Permission.ADMINISTRATOR) - + requirePermission(Permission.MANAGE_EVENTS) publicGuildSubCommand(::AttendanceCreateArgs) { name = "create" description = "Create a new attendance event" - requirePermission(Permission.ADMINISTRATOR) + requirePermission(Permission.CREATE_SCHEDULED_EVENTS) noDefer() action { @@ -201,7 +200,7 @@ class AttendanceExtension : Extension() { name = "edit" description = "Edits an existing attendance event" - requirePermission(Permission.ADMINISTRATOR) + requirePermission(Permission.MANAGE_EVENTS) noDefer() action { @@ -260,7 +259,7 @@ class AttendanceExtension : Extension() { publicGuildSubCommand(::AttendanceRemoveArgs) { name = "remove" description = "Remove an attendance event" - requirePermission(Permission.ADMINISTRATOR) + requirePermission(Permission.MANAGE_EVENTS) action { val attendanceId = arguments.attendanceId @@ -279,7 +278,6 @@ class AttendanceExtension : Extension() { publicGuildSubCommand { name = "list" description = "List the attendance events" - requirePermission(Permission.ADMINISTRATOR) action { val attendanceEvents = attendanceManager.getByGuildKey(guild!!.idLong) @@ -308,9 +306,6 @@ class AttendanceExtension : Extension() { name = "info" description = "Display all information of an attendance event" - requirePermission(Permission.ADMINISTRATOR) - - action { val data = this.arguments.attendanceData.await() val jumpUrl = Helpers.format(