From 74843e54ed3803e9ee372f9164f0d58a82bf1041 Mon Sep 17 00:00:00 2001 From: Jannik Reimers Date: Fri, 25 Oct 2024 10:05:21 +0200 Subject: [PATCH] some config --- .github/dependabot.yml | 15 --------------- .gitignore | 4 ++-- .idea/misc.xml | 2 +- README.md | 4 ++-- build.gradle.kts | 6 +++--- detekt.yml | 4 ++-- gradlew | 2 +- settings.gradle.kts | 2 +- .../{template => dev/jansel/feixiao}/App.kt | 4 ++-- .../jansel/feixiao}/extensions/TestExtension.kt | 8 ++++---- 10 files changed, 18 insertions(+), 33 deletions(-) delete mode 100644 .github/dependabot.yml rename src/main/kotlin/{template => dev/jansel/feixiao}/App.kt (91%) rename src/main/kotlin/{template => dev/jansel/feixiao}/extensions/TestExtension.kt (94%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index e1d211c..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: 2 -enable-beta-ecosystems: true - -updates: - - package-ecosystem: "gradle" - directory: "/" - - schedule: - interval: "weekly" - - - package-ecosystem: "github-actions" - directory: "/" - - schedule: - interval: "weekly" diff --git a/.gitignore b/.gitignore index 79cf6b4..146b35e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Created by .ignore support plugin (hsz.mobi) -### Kotlin template +### Kotlin dev.jansel.template # Compiled class file *.class @@ -24,7 +24,7 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* -### JetBrains template +### JetBrains dev.jansel.template # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 diff --git a/.idea/misc.xml b/.idea/misc.xml index 2f28762..c6d38c5 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -5,7 +5,7 @@ - + \ No newline at end of file diff --git a/README.md b/README.md index 368c541..eeae177 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # KordEx Bot Template -This repository contains a basic KordEx example bot for you to use as a template for your own KordEx bots. This +This repository contains a basic KordEx example bot for you to use as a dev.jansel.template for your own KordEx bots. This includes the following: - A basic extension that allows you to slap other people, using both chat commands and slash commands. @@ -15,7 +15,7 @@ includes the following: - A Groovy-based Logback config, so you have reasonable logging out of the box. - Automatic generation of a Dockerfile via a `createDockerFile` task, also run at build time. -**Note:** This template includes a `.editorconfig` file that defaults to using tabs for indentation in almost all file +**Note:** This dev.jansel.template includes a `.editorconfig` file that defaults to using tabs for indentation in almost all file types. This is because tabs are more accessible for the blind, or those with impaired vision. We won't accept feedback or PRs targeting this approach, though you can always change it in your projects. diff --git a/build.gradle.kts b/build.gradle.kts index f7e5e79..a9502b7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,7 +12,7 @@ plugins { id("dev.kordex.gradle.kordex") } -group = "template" +group = "dev.jansel" version = "1.0-SNAPSHOT" dependencies { @@ -36,7 +36,7 @@ kordEx { // See https://docs.kordex.dev/data-collection.html dataCollection(DataCollection.Standard) - mainClass = "template.AppKt" + mainClass = "dev.jansel.feixiao.AppKt" } } @@ -56,7 +56,7 @@ docker { // Each function (aside from comment/emptyLine) corresponds to a Dockerfile instruction. // See: https://docs.docker.com/reference/dockerfile/ - from("openjdk:21-jdk-slim") + from("azul/zulu-openjdk-alpine:21-latest") emptyLine() diff --git a/detekt.yml b/detekt.yml index e3ddb48..6250328 100644 --- a/detekt.yml +++ b/detekt.yml @@ -43,7 +43,7 @@ comments: AbsentOrWrongFileLicense: active: false - licenseTemplateFile: 'license.template' + licenseTemplateFile: 'license.dev.jansel.template' CommentOverPrivateFunction: active: false CommentOverPrivateProperty: @@ -395,7 +395,7 @@ naming: InvalidPackageDeclaration: active: true # TODO: Update this with your project's base package - rootPackage: 'template' + rootPackage: 'dev.jansel.template' MatchingDeclarationName: active: true diff --git a/gradlew b/gradlew index b740cf1..d684a9f 100755 --- a/gradlew +++ b/gradlew @@ -54,7 +54,7 @@ # There are tweaks for specific operating systems such as AIX, CygWin, # Darwin, MinGW, and NonStop. # -# (3) This script is generated from the Groovy template +# (3) This script is generated from the Groovy dev.jansel.template # 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. # diff --git a/settings.gradle.kts b/settings.gradle.kts index 88dfd23..875ca14 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -15,4 +15,4 @@ pluginManagement { } } -rootProject.name = "template" +rootProject.name = "feixiao" diff --git a/src/main/kotlin/template/App.kt b/src/main/kotlin/dev/jansel/feixiao/App.kt similarity index 91% rename from src/main/kotlin/template/App.kt rename to src/main/kotlin/dev/jansel/feixiao/App.kt index 33828ef..da70259 100644 --- a/src/main/kotlin/template/App.kt +++ b/src/main/kotlin/dev/jansel/feixiao/App.kt @@ -1,12 +1,12 @@ /* * This Kotlin source file was generated by the Gradle 'init' task. */ -package template +package dev.jansel.feixiao import dev.kord.common.entity.Snowflake import dev.kordex.core.ExtensibleBot import dev.kordex.core.utils.env -import template.extensions.TestExtension +import dev.jansel.feixiao.extensions.TestExtension val TEST_SERVER_ID = Snowflake( env("TEST_SERVER").toLong() // Get the test server ID from the env vars or a .env file diff --git a/src/main/kotlin/template/extensions/TestExtension.kt b/src/main/kotlin/dev/jansel/feixiao/extensions/TestExtension.kt similarity index 94% rename from src/main/kotlin/template/extensions/TestExtension.kt rename to src/main/kotlin/dev/jansel/feixiao/extensions/TestExtension.kt index 432649e..5dca05b 100644 --- a/src/main/kotlin/template/extensions/TestExtension.kt +++ b/src/main/kotlin/dev/jansel/feixiao/extensions/TestExtension.kt @@ -1,4 +1,4 @@ -package template.extensions +package dev.jansel.feixiao.extensions import dev.kordex.core.commands.Arguments import dev.kordex.core.commands.converters.impl.coalescingDefaultingString @@ -10,13 +10,13 @@ import dev.kordex.core.extensions.Extension import dev.kordex.core.extensions.chatCommand import dev.kordex.core.extensions.publicSlashCommand import dev.kordex.core.utils.respond -import template.TEST_SERVER_ID +import dev.jansel.feixiao.TEST_SERVER_ID class TestExtension : Extension() { override val name = "test" override suspend fun setup() { - chatCommand(::SlapArgs) { + chatCommand(TestExtension::SlapArgs) { name = "slap" description = "Ask the bot to slap another user" @@ -57,7 +57,7 @@ class TestExtension : Extension() { } } - publicSlashCommand(::SlapSlashArgs) { + publicSlashCommand(TestExtension::SlapSlashArgs) { name = "slap" description = "Ask the bot to slap another user"