diff --git a/src/main/java/Main.kt b/src/main/java/Main.kt index 76a4a85..4a6094c 100644 --- a/src/main/java/Main.kt +++ b/src/main/java/Main.kt @@ -1,6 +1,5 @@ +import dev.kord.common.entity.Snowflake import dev.kord.core.Kord -import dev.kord.core.event.message.MessageCreateEvent -import dev.kord.core.on import io.ktor.server.application.* import io.ktor.server.cio.* import io.ktor.server.engine.* @@ -21,11 +20,6 @@ suspend fun main() { }) val kord = Kord("MTE3MTIwODc1MDE5MTg5MDQ4Mw.GOUedL.i3zD6IG5B6fFRvaSOotWwJ5KBRK2whC9xr0vL8") - kord.on { - if (message.author?.isBot == false) { - this.message.channel.createMessage("I exist!") - } - } val server = embeddedServer(CIO, port = 8080){ routing { @@ -35,9 +29,15 @@ suspend fun main() { searchPage() trackPage() racePage() + get("/hi") { + kord.rest.channel.createMessage(Snowflake("1040400994355392522")) { + this.content = "<@&978289601506586624> Herro!" + } + } } } println("connection to localhost:8080 now possible.") server.start(false) kord.login() + } \ No newline at end of file