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,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

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