From 6d99022bda1e755732968f60a7cdbd255748b77e Mon Sep 17 00:00:00 2001 From: limited_dev Date: Mon, 5 Jun 2023 12:51:46 +0200 Subject: [PATCH] !fix: removed the possibility of some Extensions running in DMs Signed-off-by: limited_dev --- .../net/moonleay/lilJudd/extensions/FeatureManageExtension.kt | 2 ++ .../kotlin/net/moonleay/lilJudd/extensions/TestExtension.kt | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/main/kotlin/net/moonleay/lilJudd/extensions/FeatureManageExtension.kt b/src/main/kotlin/net/moonleay/lilJudd/extensions/FeatureManageExtension.kt index 43cfbd4..373fcc7 100644 --- a/src/main/kotlin/net/moonleay/lilJudd/extensions/FeatureManageExtension.kt +++ b/src/main/kotlin/net/moonleay/lilJudd/extensions/FeatureManageExtension.kt @@ -42,6 +42,8 @@ import org.jetbrains.exposed.sql.transactions.transaction class FeatureManageExtension : Extension() { override val name = "feature" + override val allowApplicationCommandInDMs: Boolean + get() = false /* * Note: This has to be rewritten at some point to better support more features diff --git a/src/main/kotlin/net/moonleay/lilJudd/extensions/TestExtension.kt b/src/main/kotlin/net/moonleay/lilJudd/extensions/TestExtension.kt index c6d44c3..049b2e5 100644 --- a/src/main/kotlin/net/moonleay/lilJudd/extensions/TestExtension.kt +++ b/src/main/kotlin/net/moonleay/lilJudd/extensions/TestExtension.kt @@ -30,6 +30,9 @@ import net.moonleay.lilJudd.util.MessageUtil It is used in testing to test stuff, without having to wait for certain events to trigger. */ class TestExtension : Extension() { override val name = "test" + override val allowApplicationCommandInDMs: Boolean + get() = false + override suspend fun setup() { publicSlashCommand { name = "test"