Kord

K

Kord

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

Join

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?

Chat input command trailing lambda separation

I am attempting to write a function which creates chat input command (as a part of a slash command interface). There are two different methods Kord.createGuildChatInputCommand and Kord.createGlobalChatInputCommand. The command parameters are exactly the same. How can I separate the command parameters so I only have to write it once?...

Interaction: Valid action without modify interaction message

Hello When a user click on a button in a RowAction, I would like to do something in my program, with no modification to the interaction message. For the moment, I do: interaction.deferPublicMessageUpdate().edit { } with nothing in it. That works but I think that's not the clean solution...

Easy way to register commands

Is there an annotation or other way to directly define and associate a command with a function? For example, taken from the wiki: ```kotlin kord.createGuildChatInputCommand(...