Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dev.kordex.gradle.plugins.docker.file.*
import dev.kordex.gradle.plugins.kordex.DataCollection

import org.apache.tools.ant.taskdefs.condition.Os
import java.util.*

plugins {
Expand All @@ -11,11 +11,13 @@ plugins {

alias(libs.plugins.kordex.plugin)
alias(libs.plugins.kordex.docker)
alias(libs.plugins.kordex.translation)

id("net.kyori.blossom") version "2.1.0"
id("net.kyori.indra.git") version "3.2.0"
}


fun String.runCommand(
workingDir: File = File("."),
timeoutAmount: Long = 60,
Expand All @@ -35,20 +37,24 @@ fun String.runCommand(
}


group = "org.hyacinthbots.allium"
group = "org.hyacinthbots"

version = if ("git branch --show-current"
.runCommand(workingDir = rootDir)
.replace("/", ".") == "root") {
"1.0.4"
} else {
"1.0.5-build.local-" +
"git rev-parse --short=8 HEAD"
.runCommand(workingDir = rootDir) +
"-" +
"git branch --show-current"
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
version = "eww-testing-on-windows"
} else {
version = if ("git branch --show-current"
.runCommand(workingDir = rootDir)
.replace("/", ".")
.replace("/", ".") == "root") {
"date +%Y-%m-%d".runCommand()
} else {
"date +%Y-%m-%d".runCommand() + "-build.local-" +
"git rev-parse --short=8 HEAD"
.runCommand(workingDir = rootDir) +
"-" +
"git branch --show-current"
.runCommand(workingDir = rootDir)
.replace("/", ".")
}
}

var buildTime = Date().time / 1000
Expand Down Expand Up @@ -83,6 +89,8 @@ kordEx {
// The current LTS Java version
jvmTarget = 21

kordVersion = "0.18.0-SNAPSHOT"

module("func-mappings")
module("pluralkit")

Expand All @@ -95,8 +103,7 @@ kordEx {
}

i18n {
classPackage = "org.hyacinthbots.allium.i18n"
translationBundle = "allium.strings"
bundle("allium.strings", "org.hyacinthbots.allium.i18n")
}
}

Expand All @@ -110,7 +117,7 @@ tasks {
* Update gradle by changing `gradleVersion` below to the new version,
* then run `./gradlew wrapper` twice to update the scripts properly.
*/
gradleVersion = "9.1.0"
gradleVersion = "9.3.1"
distributionType = Wrapper.DistributionType.BIN
}
}
Expand Down
18 changes: 11 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
[versions]
kotlin = "2.2.20" # Note: Plugin versions must be updated in the settings.gradle.kts too
kotlin = "2.3.10" # Note: Plugin versions must be updated in the settings.gradle.kts too

groovy = "3.0.25"
jansi = "2.4.2"
kx-ser = "1.9.0"
logback = "1.5.18"
kx-ser = "1.10.0"
logback = "1.5.32"
logback-groovy = "1.14.5"
logging = "7.0.13"
logging = "8.0.01"
kx-coroutines = "1.10.2"
kmongo = "5.2.1"
kordex-gradle = "1.7.4"
kmongo = "5.5.1"
kordex-gradle = "1.9.0"
doc-gen = "0.3.0-rc.2"
gson = "2.12.1"
gson = "2.13.2"
kordex-translation = "1.1.1"


[libraries]
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
Expand All @@ -32,3 +34,5 @@ kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", versi

kordex-docker = { id = "dev.kordex.gradle.docker", version.ref = "kordex-gradle" }
kordex-plugin = { id = "dev.kordex.gradle.kordex", version.ref = "kordex-gradle" }
kordex-translation = { id = "dev.kordex.gradle.i18n", version.ref = "kordex-translation" }

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-9.1.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
12 changes: 4 additions & 8 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

99 changes: 48 additions & 51 deletions src/main/kotlin/org/hyacinthbots/allium/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@ import ch.qos.logback.classic.Level
import ch.qos.logback.classic.LoggerContext
import com.google.gson.JsonArray
import com.google.gson.JsonParser
import dev.kord.common.entity.MessageFlag
import dev.kord.common.entity.SeparatorSpacingSize
import dev.kord.core.Kord
import dev.kord.gateway.Intent
import dev.kord.gateway.PrivilegedIntent
import dev.kord.rest.builder.component.actionRow
import dev.kord.rest.builder.component.section
import dev.kord.rest.builder.component.textDisplay
import dev.kord.rest.builder.message.actionRow
import dev.kord.rest.builder.message.container
import dev.kord.rest.builder.message.embed
import dev.kord.rest.builder.message.messageFlags
import dev.kordex.core.ExtensibleBot
import dev.kordex.core.i18n.SupportedLocales
import dev.kordex.modules.func.mappings.extMappings
Expand Down Expand Up @@ -36,58 +43,48 @@ suspend fun main() {
ephemeral = false
general {
message {
embed {
description = "Hello! I am Allium, a Minecraft modding focused bot."
title = "Allium"

field {
name = "Birthday (initial date of idea)"
value = "September 6th, 2022"
}
field {
name = " Main Developers"
value = "Jansel"
}
field {
name = "Contributors"
value = """[Jansel](https://github.com/NotJansel)
|[TemperΘΔ](https://github.com/StonkDragon)
|[triphora](https://github.com/triphora)
|[NoComment](https://github.com/NoComment1105)
|[Scrumplex](https://github.com/Scrumplex)
|[gdude](https://github.com/gdude2002)
""".trimMargin()
}
field {
val kord = getKoin().get<Kord>()
name = "Guilds"
value = kord.guilds.count().toString()
}
field {
name = "Build"
value = BUILD.toString()
}
field {
name = "This build was created on:"
value = "<t:$BUILDTIME>"
}
field {
name = "Next update?"
value = getRandomUpdateMessage()
}
val kord = getKoin().get<Kord>()
messageFlags {
+MessageFlag.IsComponentsV2
}
actionRow {
linkButton("https://github.com/HyacinthBots/Allium") {
label = "Source Code"
}
linkButton("https://discord.com/api/oauth2/authorize?client_id=1013045351852298280&permissions=347136&scope=bot%20applications.commands") {
label = "Invite"
}
linkButton("https://github.com/HyacinthBots/.github/blob/main/terms-of-service.md") {
label = "Terms of Service"
}
linkButton("https://github.com/HyacinthBots/Allium/tree/root/docs/privacy-policy.md") {
label = "Privacy Policy"
container {
textDisplay("""# Allium
|Hello! I am Allium, a Minecraft modding focused bot.
""".trimMargin())
separator(SeparatorSpacingSize.Large)
textDisplay("""## General info
|- Birthday (initial date of idea): September 6th, 2022
|- Main Developers: Jansel
|
|Contributors:
|[Jansel](https://github.com/NotJansel)
|[TemperΘΔ](https://github.com/StonkDragon)
|[triphora](https://github.com/triphora)
|[NoComment](https://github.com/NoComment1105)
|[Scrumplex](https://github.com/Scrumplex)
|[gdude](https://github.com/gdude2002)
""".trimMargin())
separator(SeparatorSpacingSize.Large)
textDisplay("""## Bot & Build info
|Guilds: ${kord.guilds.count()}
|Build: $BUILD
|Built on: <t:$BUILDTIME>
|Next Update: ${getRandomUpdateMessage()}
""".trimMargin())
separator(SeparatorSpacingSize.Large)
actionRow {
linkButton("https://github.com/HyacinthBots/Allium") {
label = "Source Code"
}
linkButton("https://discord.com/api/oauth2/authorize?client_id=1013045351852298280&permissions=347136&scope=bot%20applications.commands") {
label = "Add me to your Server"
}
linkButton("https://github.com/HyacinthBots/.github/blob/main/terms-of-service.md") {
label = "Terms of Service"
}
linkButton("https://github.com/HyacinthBots/Allium/tree/root/docs/privacy-policy.md") {
label = "Privacy Policy"
}
}
}
}
Expand Down
Loading
Loading