forked from DiscordBots/lilJudd
feat: add MemberIntent
Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
parent
865964aebe
commit
0a16994e61
1 changed files with 10 additions and 1 deletions
|
@ -24,6 +24,8 @@ import dev.kord.common.entity.PresenceStatus
|
||||||
import dev.kord.core.behavior.interaction.response.respond
|
import dev.kord.core.behavior.interaction.response.respond
|
||||||
import dev.kord.core.event.interaction.ButtonInteractionCreateEvent
|
import dev.kord.core.event.interaction.ButtonInteractionCreateEvent
|
||||||
import dev.kord.core.on
|
import dev.kord.core.on
|
||||||
|
import dev.kord.gateway.Intent
|
||||||
|
import dev.kord.gateway.PrivilegedIntent
|
||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import net.moonleay.botendo.build.BuildConstants
|
import net.moonleay.botendo.build.BuildConstants
|
||||||
|
@ -41,6 +43,8 @@ import kotlin.system.exitProcess
|
||||||
object Bot {
|
object Bot {
|
||||||
//The kord object gets set at app launch
|
//The kord object gets set at app launch
|
||||||
lateinit var bot: ExtensibleBot
|
lateinit var bot: ExtensibleBot
|
||||||
|
|
||||||
|
@OptIn(PrivilegedIntent::class)
|
||||||
suspend fun start() {
|
suspend fun start() {
|
||||||
Logger.out("Starting Bot...")
|
Logger.out("Starting Bot...")
|
||||||
|
|
||||||
|
@ -89,6 +93,7 @@ object Bot {
|
||||||
add(::VersionExtension)
|
add(::VersionExtension)
|
||||||
add(::FeatureManageExtension)
|
add(::FeatureManageExtension)
|
||||||
add(::SendPlannerExtension)
|
add(::SendPlannerExtension)
|
||||||
|
//add(::UpdateRolesExtension) // This command is only for debugging purposes
|
||||||
//add(::TestExtension) // See comment in TestExtension.kt
|
//add(::TestExtension) // See comment in TestExtension.kt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +102,11 @@ object Bot {
|
||||||
this.playing("v." + BuildConstants.version)
|
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 ->
|
sharding { recommended ->
|
||||||
Shards(recommended)
|
Shards(recommended)
|
||||||
|
|
Loading…
Reference in a new issue