Skip to content

Commit

Permalink
Merge branch 'develop' into root
Browse files Browse the repository at this point in the history
  • Loading branch information
NotJansel committed Jun 27, 2024
2 parents 6dfaa29 + 23ec4c6 commit 1945ae4
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fun String.runCommand(
group = "org.hyacinthbots.allium"
//version = "0.6.0-build.local-" + "git rev-parse --short=8 HEAD".runCommand(workingDir = rootDir) + "-" + "git branch --show-current".runCommand(workingDir = rootDir).replace("/", ".")
var buildTime = Date().time / 1000
version = "0.6.3"
version = "0.6.4"
// The current LTS Java version
val javaVersion = 17

Expand Down Expand Up @@ -148,7 +148,7 @@ tasks {
Update gradle by changing `gradleVersion` below to the new version,
then run `./gradlew wrapper` twice to update the scripts properly.
*/
gradleVersion = "8.6"
gradleVersion = "8.8"
distributionType = Wrapper.DistributionType.BIN
}
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CurseForge : Extension() {
json(Json { ignoreUnknownKeys = true })
}
install(UserAgent) {
agent = "hyacinthbots/allium/$BUILD ([email protected])"
agent = "hyacinthbots/allium/$BUILD ([email protected])"
}
}

Expand Down Expand Up @@ -61,6 +61,7 @@ class CurseForge : Extension() {
embedProject(response.data[i])
}
}
owner = user
timeoutSeconds = 180
locale = Locale.ENGLISH
}.send()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import dev.kord.rest.builder.message.EmbedBuilder
import dev.kord.rest.builder.message.actionRow
import dev.kord.rest.builder.message.embed
import io.ktor.client.*
import io.ktor.client.plugins.*
import io.ktor.client.request.*
import io.ktor.client.request.forms.*
import io.ktor.client.statement.*
Expand All @@ -37,6 +38,7 @@ import kotlinx.serialization.Serializable
import kotlinx.serialization.json.Json
import org.hyacinthbots.allium.database.collections.ConfigCollection
import org.hyacinthbots.allium.database.collections.LogUploadingCollection
import org.hyacinthbots.allium.utils.BUILD
import java.io.ByteArrayInputStream
import java.io.IOException
import java.util.zip.GZIPInputStream
Expand Down Expand Up @@ -304,7 +306,11 @@ class LogUploading : Extension() {
data class LogData(val success: Boolean, val id: String? = null, val error: String? = null)

private suspend fun postToMCLogs(text: String): String {
val client = HttpClient()
val client = HttpClient() {
install(UserAgent) {
agent = "hyacinthbots/allium/$BUILD ([email protected])"
}
}
val cleanText = text.replace("\r\n", "\n", true).replace("\r", "\n", true)
val response = client.post("https://api.mclo.gs/1/log") {
setBody(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Modrinth : Extension() {
json(Json { ignoreUnknownKeys = true })
}
install(UserAgent) {
agent = "hyacinthbots/allium/$BUILD ([email protected])"
agent = "hyacinthbots/allium/$BUILD ([email protected])"
}
}

Expand Down Expand Up @@ -106,6 +106,7 @@ class Modrinth : Extension() {
embedProject(response.hits[i])
}
}
owner = user
timeoutSeconds = 180
locale = Locale.ENGLISH
}.send()
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/org/hyacinthbots/allium/utils/_Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private val client = HttpClient(CIO) {
json(Json { ignoreUnknownKeys = true })
}
install(UserAgent) {
agent = "hyacinthbots/allium/$BUILD ([email protected])"
agent = "hyacinthbots/allium/$BUILD ([email protected])"
}
}

Expand Down

0 comments on commit 1945ae4

Please sign in to comment.