Kord

K

Kord

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

Join

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(...

`Unresolved reference: int` when creating input command

I'm following the example in the very sparse wiki, but it doesn't seem to be valid anymore (it was last updated over 2 years ago). I get the error Unresolved reference: int, string seems to not show errors though. Any ideas on how to fix this? Or are there any more complex sample projects I could look at? ```kotlin kord.createGuildChatInputCommand( Snowflake(556525343595298817),...

Event when ephemeral message is deleted by user

Hello All is in title, but, if I need to clean some things in memory when a message is deleted, in public interaction, that's simple, but for ephemral interaction. Is there a event to detect that? Thanks...

Menu & Edit response

Hello I'm using a Menu to select element. When I select one element, I'm using response.edit to add an embed. But I have two problems:...
Next