Kord

K

Kord

Join the community to ask questions about Kord and get answers from other members.

Join

Is Kord#getApplicationInfo() cached?

Is Kord#getApplicationInfo() backed by a cache? I'd like to check if the message author is the owner of the application.

Can't find a way to disconnect/kick someone

Hello, everyone! I have a bot made in Kord and I've used it a lot to play sounds based on VoiceState changes and timed stuff. Now I wanted to do some kind of routine to disconnect users who have been fully muted for a long time. I was able to get all active users/members/voicestates etc but I can't find a way to disconnect them from the voice channel, I searched through the docs but it seems I'm either using this lib in a wrong way (totally possible) or there's no disconnect/leave command or it has another "name". Thanks!...

Runtime Error

I don’t remember changing anything, I just started getting an error on startup. I use kord 0.15.0 and Kord-Extensions 1.9.0 ```kotlin Caused by: java.lang.NoClassDefFoundError: io/ktor/client/plugins/contentnegotiation/ContentNegotiation at dev.kord.core.builder.kord.KordBuilderUtilKt.defaultConfig(KordBuilderUtil.kt:16)...

Publish multiplatform library (not Discord bot)

Hello This is the list of supported platform of my lib: ``` iosX64()...

Support of native targets (not Discord bot)

Hello I tried to add the support of native targets (not for my discord bot), so I have: (code in comment) ...

Join voice channel

How can I make the bot join a voice channel? I couldnt find a method in VoiceChannel nor Member

Compilation error with KSP

Hello, I'm facing this particular error when compiling my project and its ksp subproject:
> Task :kspKotlinMingwX64 FAILED
e: Could not find "org.jetbrains.kotlinx:kotlinx-datetime-cinterop-date" in [C:\Users\1\Desktop\kotlin\Cordex, D:\.konan\klib, D:\.konan\kotlin-native-prebuilt-windows-x86_64-1.9.22\klib\common, D:\.konan\kotlin-native-prebuilt-windows-x86_64-1.9.22\klib\platform\mingw_x64]
> Task :kspKotlinMingwX64 FAILED
e: Could not find "org.jetbrains.kotlinx:kotlinx-datetime-cinterop-date" in [C:\Users\1\Desktop\kotlin\Cordex, D:\.konan\klib, D:\.konan\kotlin-native-prebuilt-windows-x86_64-1.9.22\klib\common, D:\.konan\kotlin-native-prebuilt-windows-x86_64-1.9.22\klib\platform\mingw_x64]
...

Running distribution inside docker container?

I built distribution and currently trying to run inside a Docker container but getting such error. Anyone knows what might be the problem? ``` glados-bot-container | Error: Could not find or load main class surik.simyan.glados.MainKt glados-bot-container | Caused by: java.lang.ClassNotFoundException: surik.simyan.glados.MainKt...

How do I add components to an interaction response?

event.interaction.respondEphemeral {
content = ""
}
event.interaction.respondEphemeral {
content = ""
}
...

kord cache method doesn't exist

error https://sourceb.in/rxnUgPpdxO gradle.build ```gradle include implementation("dev.kord:kord-core:0.14.0")...

Unknown message/webhook/interaction null

All of sudden, I started getting this error message from REST, I haven't changed anything in the code, neither in configuration. Source code of the class it occurs in is here: ```kt object ReportModal : ModalExecutor { private val REPORT_ROLE_MENTION = "<@&${dotenv["REPORT_ROLE_ID"]}>"...
Solution:
deferEphemeralMessageUpdate still works though

Avoid to re-render buttons and other things

Hello What's the best solution to avoid, during an interaction, sending to much thing that already rendered and not modified For example, if I have a embed with 2 buttons, but I modified only the embed, I would like to avoid to render button...

How do I unregister commands to reregister them with updates?

How do I unregister commands to reregister them with updates?

DefaultGateway error: Failed to parse literal 'null' as a long value

I have been receiving this message randomly on my bot, but it only has happened in production so far, so I haven't been able to get Debug logs for it. I'm on 0.15.0-SNAPSHOT, using Eclipse Temurin 21....

Clearing Buttons/Actionrows

Howdy How can i clear actionsrows/buttons of a message? I had two ideas: 1) ```kt...

Command Registering extremely slow

Everytime i start my bot the first 5 commands register within 200ms each. but almost always the next command takes at least 20 seconds to register. and sometimes (not shown in the image) the last command just never registers.
No description

Multiplatform interface problem

Hello Maybe you already have this type of issue and can help me I have the error:...

Passing data through interactions

Is there a way to pass some data (e.g. message ID) through multiple interactions? I'd like to make a message command, which opens a modal and then uses data from the original message and the modal. I know that there is customContext property, but dunno if it's somehow related to that. Or should I just create an object holding my data and store it until used or a certain amount of time is reached?

Gradlew run for bot

[SOLVED]The bot works when i run it through Intelij but not when i try the terminal, is this familiar and anyone know how to help?
No description

Managing commands

How do you usually manage your commands, how do you get rid of the old ones? Do you delete every command on startup?