We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c945b9 commit 18aba1bCopy full SHA for 18aba1b
src/main/kotlin/discord/DiscordClient.kt
@@ -1,7 +1,6 @@
1
package co.discord
2
3
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
4
-import io.github.cdimascio.dotenv.Dotenv
5
import io.ktor.client.*
6
import io.ktor.client.call.*
7
import io.ktor.client.engine.cio.*
@@ -10,9 +9,8 @@ import io.ktor.http.*
10
9
11
class DiscordClient {
12
suspend fun sendAlertServer(message: DiscordMessage, serverWebhook: String): DiscordWebhookResponse {
13
- val dotenv = Dotenv.load()
14
val response = HttpClient(CIO).use { client ->
15
- client.post(dotenv["DISCORD_SERVER_ALERT_WEBHOOK"]) {
+ client.post(serverWebhook) {
16
contentType(ContentType.Application.Json)
17
setBody(jacksonObjectMapper().writeValueAsString(message))
18
}
0 commit comments