chommsi
chommsi
KKord
Created by chommsi on 4/20/2025 in #help
Calling Kord constructor throws IOException
I have just setup a new Kotlin project in Intellij I implemented the code as shown in the "Making a simple ping-pong bot" section of the github wiki, adding my own token
suspend fun main() {
val kord = Kord("MY TOKEN")
kord.on<MessageCreateEvent> { // runs every time a message is created that our bot can read

// ignore other bots, even ourselves. We only serve humans here!
if (message.author?.isBot != false) return@on

// check if our command is being invoked
if (message.content != "!ping") return@on

// all clear, give them the pong!
message.channel.createMessage("pong!")
}

kord.login {
// we need to specify this to receive the content of messages
@OptIn(PrivilegedIntent::class)
intents += Intent.MessageContent
}
}
suspend fun main() {
val kord = Kord("MY TOKEN")
kord.on<MessageCreateEvent> { // runs every time a message is created that our bot can read

// ignore other bots, even ourselves. We only serve humans here!
if (message.author?.isBot != false) return@on

// check if our command is being invoked
if (message.content != "!ping") return@on

// all clear, give them the pong!
message.channel.createMessage("pong!")
}

kord.login {
// we need to specify this to receive the content of messages
@OptIn(PrivilegedIntent::class)
intents += Intent.MessageContent
}
}
this throws the following exception: https://pastebin.com/n9FESr6k my pom.xml: https://pastebin.com/F5EEAXQ6 Version: 0.15.0 JDK: 24 I feel like something with my setup is probably wrong but I'm absolutely stumped as to what it could be at this point
117 replies