diff --git a/build.gradle b/build.gradle index 1c25f79..3dc6079 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.0.2' +version '2.0.3' compileKotlin.kotlinOptions.jvmTarget = '1.8' diff --git a/src/main/java/me/dkim19375/dkim19375jdautils/BotBase.kt b/src/main/java/me/dkim19375/dkim19375jdautils/BotBase.kt index 2e8647e..5f3b2f2 100644 --- a/src/main/java/me/dkim19375/dkim19375jdautils/BotBase.kt +++ b/src/main/java/me/dkim19375/dkim19375jdautils/BotBase.kt @@ -13,9 +13,9 @@ import kotlin.system.exitProcess @API abstract class BotBase( - val name: String, - @API val token: String, - val customListener: CustomListener = object : CustomListener() {} + open val name: String, + open val token: String, + open val customListener: CustomListener = object : CustomListener() {} ) { @API lateinit var jda: JDA @@ -71,5 +71,5 @@ abstract class BotBase( } } - fun sendEvent(event: (Command) -> Unit) = commands.forEach(event) + open fun sendEvent(event: (Command) -> Unit) = commands.forEach(event) } \ No newline at end of file diff --git a/src/main/java/me/dkim19375/dkim19375jdautils/event/CustomListener.kt b/src/main/java/me/dkim19375/dkim19375jdautils/event/CustomListener.kt index 7a98957..d7a9a6d 100644 --- a/src/main/java/me/dkim19375/dkim19375jdautils/event/CustomListener.kt +++ b/src/main/java/me/dkim19375/dkim19375jdautils/event/CustomListener.kt @@ -11,16 +11,16 @@ import net.dv8tion.jda.api.events.message.priv.PrivateMessageReceivedEvent abstract class CustomListener { @API - val antiBot: Boolean = true + open val antiBot: Boolean = true @API - fun onMessageReceived(event: MessageReceivedEvent): Boolean = true + open fun onMessageReceived(event: MessageReceivedEvent): Boolean = true @API - fun onGuildMessageReceived(event: GuildMessageReceivedEvent): Boolean = true + open fun onGuildMessageReceived(event: GuildMessageReceivedEvent): Boolean = true @API - fun onPrivateMessageReceived(event: PrivateMessageReceivedEvent): Boolean = true + open fun onPrivateMessageReceived(event: PrivateMessageReceivedEvent): Boolean = true @API - fun isValid( + open fun isValid( command: Command, cmd: String, args: List, @@ -65,7 +65,7 @@ abstract class CustomListener { } return true } - fun isValid( + open fun isValid( command: Command, cmd: String, args: List, @@ -73,7 +73,7 @@ abstract class CustomListener { ): Boolean = isValid(command, cmd, args, event.member, event.author, event.guild, event.message, event.channel, event) - fun isValid( + open fun isValid( command: Command, cmd: String, args: List, @@ -86,7 +86,7 @@ abstract class CustomListener { }, event.message, event.channel, event ) - fun isValid( + open fun isValid( command: Command, cmd: String, args: List,