1
0

some config

This commit is contained in:
Jannik Reimers 2024-10-25 10:05:21 +02:00
parent 5307298dae
commit 74843e54ed
Signed by: jansel
GPG Key ID: 39C62D7D5233CFD0
10 changed files with 18 additions and 33 deletions

View File

@ -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"

4
.gitignore vendored
View File

@ -1,5 +1,5 @@
# Created by .ignore support plugin (hsz.mobi) # Created by .ignore support plugin (hsz.mobi)
### Kotlin template ### Kotlin dev.jansel.template
# Compiled class file # Compiled class file
*.class *.class
@ -24,7 +24,7 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid* hs_err_pid*
### JetBrains template ### JetBrains dev.jansel.template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # 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 # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

2
.idea/misc.xml generated
View File

@ -5,7 +5,7 @@
<file type="web" url="file://$PROJECT_DIR$/../ext-common" /> <file type="web" url="file://$PROJECT_DIR$/../ext-common" />
<file type="web" url="file://$PROJECT_DIR$" /> <file type="web" url="file://$PROJECT_DIR$" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_13" project-jdk-name="temurin-17" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_13" project-jdk-name="azul-21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

View File

@ -1,6 +1,6 @@
# KordEx Bot Template # 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: includes the following:
- A basic extension that allows you to slap other people, using both chat commands and slash commands. - 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. - 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. - 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 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. feedback or PRs targeting this approach, though you can always change it in your projects.

View File

@ -12,7 +12,7 @@ plugins {
id("dev.kordex.gradle.kordex") id("dev.kordex.gradle.kordex")
} }
group = "template" group = "dev.jansel"
version = "1.0-SNAPSHOT" version = "1.0-SNAPSHOT"
dependencies { dependencies {
@ -36,7 +36,7 @@ kordEx {
// See https://docs.kordex.dev/data-collection.html // See https://docs.kordex.dev/data-collection.html
dataCollection(DataCollection.Standard) 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. // Each function (aside from comment/emptyLine) corresponds to a Dockerfile instruction.
// See: https://docs.docker.com/reference/dockerfile/ // See: https://docs.docker.com/reference/dockerfile/
from("openjdk:21-jdk-slim") from("azul/zulu-openjdk-alpine:21-latest")
emptyLine() emptyLine()

View File

@ -43,7 +43,7 @@ comments:
AbsentOrWrongFileLicense: AbsentOrWrongFileLicense:
active: false active: false
licenseTemplateFile: 'license.template' licenseTemplateFile: 'license.dev.jansel.template'
CommentOverPrivateFunction: CommentOverPrivateFunction:
active: false active: false
CommentOverPrivateProperty: CommentOverPrivateProperty:
@ -395,7 +395,7 @@ naming:
InvalidPackageDeclaration: InvalidPackageDeclaration:
active: true active: true
# TODO: Update this with your project's base package # TODO: Update this with your project's base package
rootPackage: 'template' rootPackage: 'dev.jansel.template'
MatchingDeclarationName: MatchingDeclarationName:
active: true active: true

2
gradlew vendored
View File

@ -54,7 +54,7 @@
# There are tweaks for specific operating systems such as AIX, CygWin, # There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop. # 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 # 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. # within the Gradle project.
# #

View File

@ -15,4 +15,4 @@ pluginManagement {
} }
} }
rootProject.name = "template" rootProject.name = "feixiao"

View File

@ -1,12 +1,12 @@
/* /*
* This Kotlin source file was generated by the Gradle 'init' task. * 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.kord.common.entity.Snowflake
import dev.kordex.core.ExtensibleBot import dev.kordex.core.ExtensibleBot
import dev.kordex.core.utils.env import dev.kordex.core.utils.env
import template.extensions.TestExtension import dev.jansel.feixiao.extensions.TestExtension
val TEST_SERVER_ID = Snowflake( val TEST_SERVER_ID = Snowflake(
env("TEST_SERVER").toLong() // Get the test server ID from the env vars or a .env file env("TEST_SERVER").toLong() // Get the test server ID from the env vars or a .env file

View File

@ -1,4 +1,4 @@
package template.extensions package dev.jansel.feixiao.extensions
import dev.kordex.core.commands.Arguments import dev.kordex.core.commands.Arguments
import dev.kordex.core.commands.converters.impl.coalescingDefaultingString 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.chatCommand
import dev.kordex.core.extensions.publicSlashCommand import dev.kordex.core.extensions.publicSlashCommand
import dev.kordex.core.utils.respond import dev.kordex.core.utils.respond
import template.TEST_SERVER_ID import dev.jansel.feixiao.TEST_SERVER_ID
class TestExtension : Extension() { class TestExtension : Extension() {
override val name = "test" override val name = "test"
override suspend fun setup() { override suspend fun setup() {
chatCommand(::SlapArgs) { chatCommand(TestExtension::SlapArgs) {
name = "slap" name = "slap"
description = "Ask the bot to slap another user" description = "Ask the bot to slap another user"
@ -57,7 +57,7 @@ class TestExtension : Extension() {
} }
} }
publicSlashCommand(::SlapSlashArgs) { publicSlashCommand(TestExtension::SlapSlashArgs) {
name = "slap" name = "slap"
description = "Ask the bot to slap another user" description = "Ask the bot to slap another user"