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.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)
|
||||
|
|
Loading…
Reference in a new issue