Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
guimc233 committed Jul 7, 2024
1 parent 1dfa0b9 commit fc265f0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/kotlin/ltd/guimc/plugin/quotly/QuotLyCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,13 @@ object QuotLyCommand: SimpleCommand(
" \"photo\": {\n" +
" \"url\": \"${member.avatarUrl}\"\n" +
" }\n" +
" },\n" +
" \"text\": \"${textMessage.replace("\\", "\\\\")
.replace("\r", "\\r")
.replace("\n", "\\n")
.replace("\t", "\\t")
.replace("\"", "\\\"")}\",\n" +
" }\n" +
" }\n" +
" ]\n" +
" }")

cooldown.flag(user!!)
postValue.getJSONArray("messages").getJSONObject(0).put("text", textMessage)
try {
val rawResp = JSONObject(HttpUtil.post("http://127.0.0.1:3000/generate", postValue.toString()))
val resp = rawResp.getJSONObject("result").getString("image")
Expand Down

0 comments on commit fc265f0

Please sign in to comment.