diff --git a/README.md b/README.md
index 8455c81..4992739 100644
--- a/README.md
+++ b/README.md
@@ -12,18 +12,28 @@ A Discord music bot, written in Kotlin using the kord library.
## Contributors
-
+
## Special Thanks to
-- HopeBaron for helping me a whole lot
+- HopeBaron for helping me a lot
-## Commands
+## Known issues
-- info -- Show basic infos about the bot
-- play -- Play a song
-- stop -- Stop playing a song and leave the vc
+- None (currently). Report issues to issues@moonleay.net or moonleay#7441
+
+## Commands & Features
+
+- Commands
+ - info -- Show basic infos about the bot
+ - play -- Play a song
+ - stop -- Stop playing a song and leave the vc
+ - skip -- Skip to the next song
+ - queue -- Show what songs are next up
+ - nowplaying -- Show what is currently playing
+- Features
+ - Button Controller -- You can control the currently playing music using buttons.
## How to self-host (using the Docker container)
diff --git a/build.gradle.kts b/build.gradle.kts
index 2413c18..dba3b59 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -22,21 +22,21 @@ import org.jetbrains.gradle.ext.TaskTriggersConfig
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
- kotlin("jvm") version "1.8.0"
+ kotlin("jvm") version "1.8.21"
id("com.github.johnrengelman.shadow") version "7.1.2"
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.6"
`maven-publish`
}
-//Botendo version 5
+//Botendo version 6
val ownerID = 372703841151614976L
group = "de.limited_dev.botendo"
version = System.getenv("CI_COMMIT_TAG")?.let { "$it-${System.getenv("CI_COMMIT_SHORT_SHA")}-prod" }
?: System.getenv("CI_COMMIT_SHORT_SHA")?.let { "$it-dev" }
- ?: "6.2.0"
+ ?: "6.3.3"
val kordver = "1.5.6"
-val lavaver = "3.8.0"
+val lavaver = "4.0.0"
val coroutinesver = "1.1.0"
val mavenArtifact = "Botendo"
@@ -77,9 +77,14 @@ val implementation by configurations.getting
implementation.extendsFrom(shadow)
dependencies {
+ //Discord
shadow("com.kotlindiscord.kord.extensions:kord-extensions:$kordver")
shadow("dev.schlaubi.lavakord:kord:$lavaver")
+
+ //Util
shadow("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesver")
+
+ //Logging
shadow("org.slf4j:slf4j-api:2.0.3")
shadow("org.slf4j:slf4j-simple:2.0.3")
}
diff --git a/gradle.properties b/gradle.properties
index b103626..6ff0886 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,19 +1,19 @@
#
-# Botendo
-# Copyright (C) 2023 limited_dev
+# Botendo
+# Copyright (C) 2023 moonleay
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
#
#
kotlin.code.style=official
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 0c59a78..85958c5 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,19 +1,19 @@
#
-# Botendo
-# Copyright (C) 2023 limited_dev
+# Botendo
+# Copyright (C) 2023 moonleay
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
#
#
distributionBase=GRADLE_USER_HOME
diff --git a/gradlew b/gradlew
index 0c7a043..10c8ca9 100755
--- a/gradlew
+++ b/gradlew
@@ -1,21 +1,21 @@
#!/bin/sh
#
-# Botendo
-# Copyright (C) 2023 limited_dev
+# Botendo
+# Copyright (C) 2023 moonleay
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
#
#
diff --git a/src/main/kotlin/de/limited_dev/botendo/Bot.kt b/src/main/kotlin/de/limited_dev/botendo/Bot.kt
index 296088e..7a60f2a 100644
--- a/src/main/kotlin/de/limited_dev/botendo/Bot.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/Bot.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -21,10 +21,10 @@ package de.limited_dev.botendo
import com.kotlindiscord.kord.extensions.ExtensibleBot
import de.limited_dev.botendo.buttons.ButtonManager
+import de.limited_dev.botendo.data.CredentialManager
import de.limited_dev.botendo.extensions.music.*
import de.limited_dev.botendo.extensions.util.InfoExtension
import de.limited_dev.botendo.extensions.util.PotatoExtension
-import de.limited_dev.botendo.util.CredentialManager
import de.limited_dev.botendo.util.Logger
import de.limited_dev.botendo.util.MessageUtil
import dev.kord.common.Color
@@ -84,24 +84,21 @@ object Bot {
val response = inter.deferPublicResponse()
val u = inter.user
val g = this.interaction.getOriginalInteractionResponse().getGuild()
- var flag = false
for (b in ButtonManager.buttons) {
- if (b.id != inter.componentId || flag)
+ if (b.id != inter.componentId)
continue
b.onInteraction(response, g, u)
- flag = true
+ return@on
}
- if (!flag) {
- response.respond {
- this.embeds = mutableListOf(
- MessageUtil.getEmbed(
- Color(0xE0311A),
- "Error",
- "Could not find button with id \"${inter.componentId}\".\nPlease report this.",
- u.asUser().username + "#" + u.asUser().discriminator
- )
+ response.respond {
+ this.embeds = mutableListOf(
+ MessageUtil.getEmbed(
+ Color(0xE0311A),
+ "Error",
+ "Could not find button with id \"${inter.componentId}\".\nPlease report this.",
+ u.asUser().username + "#" + u.asUser().discriminator
)
- }
+ )
}
}
diff --git a/src/main/kotlin/de/limited_dev/botendo/Main.kt b/src/main/kotlin/de/limited_dev/botendo/Main.kt
index 59b9dd8..428f277 100644
--- a/src/main/kotlin/de/limited_dev/botendo/Main.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/Main.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
diff --git a/src/main/kotlin/de/limited_dev/botendo/buttons/Button.kt b/src/main/kotlin/de/limited_dev/botendo/buttons/Button.kt
index 0511e2e..ea63f82 100644
--- a/src/main/kotlin/de/limited_dev/botendo/buttons/Button.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/buttons/Button.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
diff --git a/src/main/kotlin/de/limited_dev/botendo/buttons/ButtonManager.kt b/src/main/kotlin/de/limited_dev/botendo/buttons/ButtonManager.kt
index 614858d..618676b 100644
--- a/src/main/kotlin/de/limited_dev/botendo/buttons/ButtonManager.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/buttons/ButtonManager.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
diff --git a/src/main/kotlin/de/limited_dev/botendo/buttons/music/PauseButton.kt b/src/main/kotlin/de/limited_dev/botendo/buttons/music/PauseButton.kt
index f23ed45..df894b0 100644
--- a/src/main/kotlin/de/limited_dev/botendo/buttons/music/PauseButton.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/buttons/music/PauseButton.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
diff --git a/src/main/kotlin/de/limited_dev/botendo/buttons/music/QueueButton.kt b/src/main/kotlin/de/limited_dev/botendo/buttons/music/QueueButton.kt
index 6a7615c..ef6d94b 100644
--- a/src/main/kotlin/de/limited_dev/botendo/buttons/music/QueueButton.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/buttons/music/QueueButton.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
diff --git a/src/main/kotlin/de/limited_dev/botendo/buttons/music/RepeatButton.kt b/src/main/kotlin/de/limited_dev/botendo/buttons/music/RepeatButton.kt
index d354134..92c3ae2 100644
--- a/src/main/kotlin/de/limited_dev/botendo/buttons/music/RepeatButton.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/buttons/music/RepeatButton.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
diff --git a/src/main/kotlin/de/limited_dev/botendo/buttons/music/SkipButton.kt b/src/main/kotlin/de/limited_dev/botendo/buttons/music/SkipButton.kt
index 38c1992..b1793b9 100644
--- a/src/main/kotlin/de/limited_dev/botendo/buttons/music/SkipButton.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/buttons/music/SkipButton.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
diff --git a/src/main/kotlin/de/limited_dev/botendo/buttons/music/StopButton.kt b/src/main/kotlin/de/limited_dev/botendo/buttons/music/StopButton.kt
index fabc991..a6a1697 100644
--- a/src/main/kotlin/de/limited_dev/botendo/buttons/music/StopButton.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/buttons/music/StopButton.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
diff --git a/src/main/kotlin/de/limited_dev/botendo/util/CredentialManager.kt b/src/main/kotlin/de/limited_dev/botendo/data/CredentialManager.kt
similarity index 74%
rename from src/main/kotlin/de/limited_dev/botendo/util/CredentialManager.kt
rename to src/main/kotlin/de/limited_dev/botendo/data/CredentialManager.kt
index d46b5ca..78868fa 100644
--- a/src/main/kotlin/de/limited_dev/botendo/util/CredentialManager.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/data/CredentialManager.kt
@@ -1,23 +1,23 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
-package de.limited_dev.botendo.util
+package de.limited_dev.botendo.data
import java.io.*
import java.util.*
diff --git a/src/main/kotlin/de/limited_dev/botendo/extensions/music/NowPlayingExtension.kt b/src/main/kotlin/de/limited_dev/botendo/extensions/music/NowPlayingExtension.kt
index cb0f1d5..5788901 100644
--- a/src/main/kotlin/de/limited_dev/botendo/extensions/music/NowPlayingExtension.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/extensions/music/NowPlayingExtension.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -69,9 +69,9 @@ class NowPlayingExtension : Extension() {
MessageUtil.getEmbedWithImage(
Color(0x52E01A),
"Currently playing",
- "**${track.title}**\n*Now Playing*\nby ${track.author} :${
+ "**${track.title}**\n*Now Playing*\nby ${track.author} ; ${
TimeUtil.getTimeFormatedRaw(
- track.position.inWholeMilliseconds
+ player.position
)
}: ${
TimeUtil.getTimeFormatedRaw(
@@ -79,13 +79,18 @@ class NowPlayingExtension : Extension() {
)
}\n" +
">>>${track.uri}",
- "https://img.youtube.com/vi/" + UrlUtil.getYtThumbnailUrl(track.uri!!) + "/maxresdefault.jpg",
- user.asUser().username + "#" + user.asUser().discriminator
+ user.asUser().username + "#" + user.asUser().discriminator,
+ "https://img.youtube.com/vi/" + UrlUtil.getYtThumbnailUrl(track.uri.toString()) + "/maxresdefault.jpg"
)
)
this.actionRow {
- ButtonUtil.getMusicControllerButtons(player.paused, gts.repeating)
+ this.components.addAll(
+ ButtonUtil.getMusicControllerButtons(
+ player.paused,
+ gts.repeating
+ ).components
+ )
}
}
}
diff --git a/src/main/kotlin/de/limited_dev/botendo/extensions/music/PlayExtension.kt b/src/main/kotlin/de/limited_dev/botendo/extensions/music/PlayExtension.kt
index 137c16e..301c2c4 100644
--- a/src/main/kotlin/de/limited_dev/botendo/extensions/music/PlayExtension.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/extensions/music/PlayExtension.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -94,7 +94,6 @@ class PlayExtension : Extension() {
)
}
MusicManager.addToQueue(this, link, search)
-
}
}
}
diff --git a/src/main/kotlin/de/limited_dev/botendo/extensions/music/QueueExtension.kt b/src/main/kotlin/de/limited_dev/botendo/extensions/music/QueueExtension.kt
index 69bb99f..c27bde5 100644
--- a/src/main/kotlin/de/limited_dev/botendo/extensions/music/QueueExtension.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/extensions/music/QueueExtension.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -80,7 +80,12 @@ class QueueExtension : Extension() {
)
this.actionRow {
- ButtonUtil.getMusicControllerButtons(player.paused, gts.repeating)
+ this.components.addAll(
+ ButtonUtil.getMusicControllerButtons(
+ player.paused,
+ gts.repeating
+ ).components
+ )
}
}
}
diff --git a/src/main/kotlin/de/limited_dev/botendo/extensions/music/SkipExtension.kt b/src/main/kotlin/de/limited_dev/botendo/extensions/music/SkipExtension.kt
index 039f4e9..9f9c2ee 100644
--- a/src/main/kotlin/de/limited_dev/botendo/extensions/music/SkipExtension.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/extensions/music/SkipExtension.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -108,7 +108,12 @@ class SkipExtension : Extension() {
)
this.actionRow {
- ButtonUtil.getMusicControllerButtons(player.paused, gts.repeating)
+ this.components.addAll(
+ ButtonUtil.getMusicControllerButtons(
+ player.paused,
+ gts.repeating
+ ).components
+ )
}
}
}
diff --git a/src/main/kotlin/de/limited_dev/botendo/extensions/music/StopExtension.kt b/src/main/kotlin/de/limited_dev/botendo/extensions/music/StopExtension.kt
index 7c361ba..b52330b 100644
--- a/src/main/kotlin/de/limited_dev/botendo/extensions/music/StopExtension.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/extensions/music/StopExtension.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
diff --git a/src/main/kotlin/de/limited_dev/botendo/extensions/music/components/GuildTrackScheduler.kt b/src/main/kotlin/de/limited_dev/botendo/extensions/music/components/GuildTrackScheduler.kt
index 420eae7..bf8733c 100644
--- a/src/main/kotlin/de/limited_dev/botendo/extensions/music/components/GuildTrackScheduler.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/extensions/music/components/GuildTrackScheduler.kt
@@ -1,42 +1,39 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
package de.limited_dev.botendo.extensions.music.components
import de.limited_dev.botendo.util.Logger
-import dev.schlaubi.lavakord.audio.TrackEndEvent
-import dev.schlaubi.lavakord.audio.TrackExceptionEvent
-import dev.schlaubi.lavakord.audio.TrackStuckEvent
-import dev.schlaubi.lavakord.audio.on
+import dev.schlaubi.lavakord.audio.*
import dev.schlaubi.lavakord.audio.player.Player
-import dev.schlaubi.lavakord.rest.TrackResponse
+import dev.schlaubi.lavakord.rest.models.PartialTrack
import java.util.concurrent.BlockingQueue
import java.util.concurrent.LinkedBlockingQueue
class GuildTrackScheduler(val pl: Player) {
- private var queue: BlockingQueue = LinkedBlockingQueue()
+ private var queue: BlockingQueue = LinkedBlockingQueue()
var repeating = false
private var hasRegisteredEvents = false
///Add a track to queue and start playing, if there is no song currently playing
- suspend fun queue(track: TrackResponse.PartialTrack) {
+ suspend fun queue(track: PartialTrack) {
if (this.pl.playingTrack == null) {
play(track)
} else {
@@ -51,7 +48,7 @@ class GuildTrackScheduler(val pl: Player) {
this.pl.stopTrack()
}
- private suspend fun play(tr: TrackResponse.PartialTrack) {
+ private suspend fun play(tr: PartialTrack) {
this.pl.playTrack(tr)
}
@@ -62,15 +59,15 @@ class GuildTrackScheduler(val pl: Player) {
Logger.out("Adding track events to GuildTrackScheduler...")
- pl.on {
+ pl.on {
onTrackEnd(this)
}
- pl.on {
+ pl.on {
onTrackStuck(this)
}
- pl.on {
+ pl.on {
onTrackExc(this)
}
}
@@ -78,7 +75,8 @@ class GuildTrackScheduler(val pl: Player) {
private suspend fun onTrackEnd(e: TrackEndEvent) {
if (e.reason.mayStartNext) {
if (repeating) {
- this.pl.playTrack(e.track.copy())
+ Logger.out("Repeating track...")
+ this.pl.playTrack(e.getTrack().copy())
return
}
Logger.out("Track has ended; Playing next...")
@@ -88,12 +86,12 @@ class GuildTrackScheduler(val pl: Player) {
private suspend fun onTrackStuck(e: TrackStuckEvent) {
Logger.out("Track is stuck, retrying...")
- this.pl.playTrack(e.track.copy())
+ this.pl.playTrack(e.getTrack().copy())
}
private suspend fun onTrackExc(e: TrackExceptionEvent) {
Logger.out("Track had an exception, retrying...")
- this.pl.playTrack(e.track.copy())
+ this.pl.playTrack(e.getTrack().copy())
}
fun clear() {
@@ -102,11 +100,11 @@ class GuildTrackScheduler(val pl: Player) {
queue.clear()
}
- fun getQueue(): List {
+ fun getQueue(): List {
return queue.toList()
}
- fun getHead(): TrackResponse.PartialTrack {
+ fun getHead(): PartialTrack {
return queue.first()
}
diff --git a/src/main/kotlin/de/limited_dev/botendo/extensions/music/components/MusicManager.kt b/src/main/kotlin/de/limited_dev/botendo/extensions/music/components/MusicManager.kt
index f81b07e..a1342a9 100644
--- a/src/main/kotlin/de/limited_dev/botendo/extensions/music/components/MusicManager.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/extensions/music/components/MusicManager.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -33,8 +33,8 @@ import dev.kord.core.entity.Guild
import dev.kord.rest.builder.message.create.actionRow
import dev.schlaubi.lavakord.audio.Link
import dev.schlaubi.lavakord.audio.player.Player
-import dev.schlaubi.lavakord.rest.TrackResponse
import dev.schlaubi.lavakord.rest.loadItem
+import dev.schlaubi.lavakord.rest.models.TrackResponse
object MusicManager {
private var musicManagerMap: MutableMap = mutableMapOf()
@@ -76,7 +76,7 @@ object MusicManager {
MessageUtil.getEmbedWithImage(
Color(0x52E01A),
"Queuing track from link",
- "**${item.track.info.title}**\n*Queue*\nby ${item.track.info.author} :: ${
+ "**${item.track.info.title}**\n*Queue*\nby ${item.track.info.author} ;: ${
TimeUtil.getTimeFormatedRaw(
item.track.info.length
)
@@ -108,7 +108,7 @@ object MusicManager {
MessageUtil.getEmbedWithImage(
Color(0x52E01A),
"Queuing playlist from link",
- "**${item.tracks.first().info.title}**\n*${item.playlistInfo.name}*\nby ${item.tracks.first().info.author} :: ${
+ "**${item.tracks.first().info.title}**\n*${item.playlistInfo.name}*\nby ${item.tracks.first().info.author} ;: ${
TimeUtil.getTimeFormatedRaw(
item.tracks.first().info.length
)
@@ -137,7 +137,7 @@ object MusicManager {
MessageUtil.getEmbedWithImage(
Color(0x52E01A),
"Queuing track from query",
- "**${item.tracks.first().info.title}**\n*Queue*\nby ${item.tracks.first().info.author} :: ${
+ "**${item.tracks.first().info.title}**\n*Queue*\nby ${item.tracks.first().info.author} ;: ${
TimeUtil.getTimeFormatedRaw(
item.tracks.first().info.length
)
diff --git a/src/main/kotlin/de/limited_dev/botendo/extensions/util/InfoExtension.kt b/src/main/kotlin/de/limited_dev/botendo/extensions/util/InfoExtension.kt
index 347533a..1414ef1 100644
--- a/src/main/kotlin/de/limited_dev/botendo/extensions/util/InfoExtension.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/extensions/util/InfoExtension.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -37,7 +37,9 @@ class InfoExtension : Extension() {
"Botendo ***v." + BuildConstants.version + "***\n" +
"Kord-Extensions ***v." + BuildConstants.kordVersion + "***\n" +
"lavalink.kt ***v." + BuildConstants.lavaVersion + "***\n" +
- "Coroutines ***v." + BuildConstants.coroutinesVersion + "***"
+ "Coroutines ***v." + BuildConstants.coroutinesVersion + "***\n\n\n" +
+ "***Bot made by moonleay#7441***\n" +
+ "(c) 2023, licensed under GPL-3.0"
)
}
}
diff --git a/src/main/kotlin/de/limited_dev/botendo/extensions/util/PotatoExtension.kt b/src/main/kotlin/de/limited_dev/botendo/extensions/util/PotatoExtension.kt
index 2f46c5b..fa9ae0e 100644
--- a/src/main/kotlin/de/limited_dev/botendo/extensions/util/PotatoExtension.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/extensions/util/PotatoExtension.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
diff --git a/src/main/kotlin/de/limited_dev/botendo/util/ButtonUtil.kt b/src/main/kotlin/de/limited_dev/botendo/util/ButtonUtil.kt
index e92434d..bf53762 100644
--- a/src/main/kotlin/de/limited_dev/botendo/util/ButtonUtil.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/util/ButtonUtil.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
diff --git a/src/main/kotlin/de/limited_dev/botendo/util/Logger.kt b/src/main/kotlin/de/limited_dev/botendo/util/Logger.kt
index 4164218..dc5af6d 100644
--- a/src/main/kotlin/de/limited_dev/botendo/util/Logger.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/util/Logger.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -31,12 +31,12 @@ object Logger {
try {
println(
("[" + Class.forName(caller.className).simpleName + "." +
- caller.methodName + ":" + caller.lineNumber + "] [" + dtf.format(now)).toString() + "] <" + msg + ">"
+ caller.methodName + ":" + caller.lineNumber + "] [" + dtf.format(now)) + "] <" + msg + ">"
)
} catch (e: ClassNotFoundException) {
e.printStackTrace()
}
// Ich kann nicht mehr
- // [Klasse.Funktion] [T/M HH:MM]
+ // [Class.function] [T/M HH:MM]
}
}
diff --git a/src/main/kotlin/de/limited_dev/botendo/util/MessageUtil.kt b/src/main/kotlin/de/limited_dev/botendo/util/MessageUtil.kt
index 5085188..1760c92 100644
--- a/src/main/kotlin/de/limited_dev/botendo/util/MessageUtil.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/util/MessageUtil.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
diff --git a/src/main/kotlin/de/limited_dev/botendo/util/Status.kt b/src/main/kotlin/de/limited_dev/botendo/util/Status.kt
index f8d6201..05cf91e 100644
--- a/src/main/kotlin/de/limited_dev/botendo/util/Status.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/util/Status.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
diff --git a/src/main/kotlin/de/limited_dev/botendo/util/TimeUtil.kt b/src/main/kotlin/de/limited_dev/botendo/util/TimeUtil.kt
index d2a9676..2c914dd 100644
--- a/src/main/kotlin/de/limited_dev/botendo/util/TimeUtil.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/util/TimeUtil.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
@@ -23,8 +23,8 @@ import java.util.concurrent.TimeUnit
object TimeUtil {
///Convert Miliseconds to xdays xhours xmins xsecs
- fun getTimeFormatedShortend(time: Long): String {
- var time = time
+ fun getTimeFormatedShortend(timeIn: Long): String {
+ var time = timeIn
val days = TimeUnit.MILLISECONDS
.toDays(time)
time -= TimeUnit.DAYS.toMillis(days)
@@ -55,8 +55,8 @@ object TimeUtil {
return s
}
- fun getTimeFormatedRaw(time: Long): String {
- var time = time
+ fun getTimeFormatedRaw(timeIn: Long): String {
+ var time = timeIn
val days = TimeUnit.MILLISECONDS
.toDays(time)
time -= TimeUnit.DAYS.toMillis(days)
diff --git a/src/main/kotlin/de/limited_dev/botendo/util/UrlUtil.kt b/src/main/kotlin/de/limited_dev/botendo/util/UrlUtil.kt
index ed67935..064d252 100644
--- a/src/main/kotlin/de/limited_dev/botendo/util/UrlUtil.kt
+++ b/src/main/kotlin/de/limited_dev/botendo/util/UrlUtil.kt
@@ -1,19 +1,19 @@
/*
- * Botendo
- * Copyright (C) 2023 limited_dev
+ * Botendo
+ * Copyright (C) 2023 moonleay
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
*/
diff --git a/src/main/resources/simplelogger.properties b/src/main/resources/simplelogger.properties
index d92ae71..6378344 100644
--- a/src/main/resources/simplelogger.properties
+++ b/src/main/resources/simplelogger.properties
@@ -1,18 +1,18 @@
#
-# Botendo
-# Copyright (C) 2023 limited_dev
+# Botendo
+# Copyright (C) 2023 moonleay
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
#
#