Testing for kord message to channel with group ping
This commit is contained in:
parent
dbf9d16caa
commit
5a53fd5f68
@ -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<MessageCreateEvent> {
|
||||
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()
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user