diff --git a/build.gradle b/build.gradle index d7c0d53..fba0c95 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 compileJava.options.encoding 'UTF-8' group 'me.dkim19375' -version '2.2.8' +version '2.2.9' //noinspection GrUnresolvedAccess compileKotlin.kotlinOptions { @@ -28,7 +28,11 @@ dependencies { } task copyFileToBot(type: Copy) { - new File('../UniG0/libs/' + project.name + '-' + project.version + '-all.jar').delete() + for (File file : new File('../UniG0/libs').listFiles()) { + if (file.getName().startsWith("dkim19375JDAUtils")) { + file.delete() + } + } from('build/libs/' + project.name + '-' + project.version + '-all.jar') into('../UniG0/libs') include('*.jar') diff --git a/src/main/java/me/dkim19375/dkim19375jdautils/managers/SpecialEventsManager.kt b/src/main/java/me/dkim19375/dkim19375jdautils/managers/SpecialEventsManager.kt index 46b3334..fe3e809 100644 --- a/src/main/java/me/dkim19375/dkim19375jdautils/managers/SpecialEventsManager.kt +++ b/src/main/java/me/dkim19375/dkim19375jdautils/managers/SpecialEventsManager.kt @@ -72,7 +72,8 @@ open class SpecialEventsManager(private val bot: BotBase) : ListenerAdapter() { * @param eventType The [EventType] of when this event should be called * @param action The Action of what should happen on event. * - * Returns **true** if the event should stop occurring, **false** if the event should keep occurring + * Returns **true** if the event should keep occurring, **false** if the event should stop occurring. + * Does not matter if [permanent] is false * @param requiredMessage The required [Message] ID of the reacted message, 0 if it can apply to any message * @param requiredChannel The required [Channel][MessageChannel] ID of the reacted message, * 0 if it can apply to any channel @@ -225,7 +226,7 @@ open class SpecialEventsManager(private val bot: BotBase) : ListenerAdapter() { future.complete( Pair( first = true, - second = action(event, guild, emoji, channel, user, msg, member) + second = !action(event, guild, emoji, channel, user, msg, member) ) ) return@removeNoPermsLabel true