From 0a16994e61c7e8e4c7eae2bc45ea9165acd94971 Mon Sep 17 00:00:00 2001 From: moonleay Date: Wed, 28 Jun 2023 22:38:26 +0200 Subject: [PATCH] feat: add MemberIntent Signed-off-by: limited_dev --- src/main/kotlin/net/moonleay/lilJudd/Bot.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/net/moonleay/lilJudd/Bot.kt b/src/main/kotlin/net/moonleay/lilJudd/Bot.kt index e0c4a41..e7247a7 100644 --- a/src/main/kotlin/net/moonleay/lilJudd/Bot.kt +++ b/src/main/kotlin/net/moonleay/lilJudd/Bot.kt @@ -24,6 +24,8 @@ import dev.kord.common.entity.PresenceStatus import dev.kord.core.behavior.interaction.response.respond import dev.kord.core.event.interaction.ButtonInteractionCreateEvent import dev.kord.core.on +import dev.kord.gateway.Intent +import dev.kord.gateway.PrivilegedIntent import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch import net.moonleay.botendo.build.BuildConstants @@ -41,6 +43,8 @@ import kotlin.system.exitProcess object Bot { //The kord object gets set at app launch lateinit var bot: ExtensibleBot + + @OptIn(PrivilegedIntent::class) suspend fun start() { Logger.out("Starting Bot...") @@ -89,6 +93,7 @@ object Bot { add(::VersionExtension) add(::FeatureManageExtension) add(::SendPlannerExtension) + //add(::UpdateRolesExtension) // This command is only for debugging purposes //add(::TestExtension) // See comment in TestExtension.kt } @@ -97,7 +102,11 @@ object Bot { this.playing("v." + BuildConstants.version) } - // Sharding will be added if the load of the bot cannot be handled by one instance + this.intents { + +Intent.GuildMembers + } + + // Will add Sharding someday, I promise /* sharding { recommended -> Shards(recommended)