Skip to content

Commit 18aba1b

Browse files
authored
feat: DiscordClient 메세지 전송 메서드 파라미터 변경 (#4)
1 parent 1c945b9 commit 18aba1b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/kotlin/discord/DiscordClient.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package co.discord
22

33
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
4-
import io.github.cdimascio.dotenv.Dotenv
54
import io.ktor.client.*
65
import io.ktor.client.call.*
76
import io.ktor.client.engine.cio.*
@@ -10,9 +9,8 @@ import io.ktor.http.*
109

1110
class DiscordClient {
1211
suspend fun sendAlertServer(message: DiscordMessage, serverWebhook: String): DiscordWebhookResponse {
13-
val dotenv = Dotenv.load()
1412
val response = HttpClient(CIO).use { client ->
15-
client.post(dotenv["DISCORD_SERVER_ALERT_WEBHOOK"]) {
13+
client.post(serverWebhook) {
1614
contentType(ContentType.Application.Json)
1715
setBody(jacksonObjectMapper().writeValueAsString(message))
1816
}

0 commit comments

Comments
 (0)