From 8ac643bbe8e64eb4cc7acfe4448567b5dfbd329d Mon Sep 17 00:00:00 2001 From: limited_dev Date: Thu, 4 May 2023 23:20:52 +0200 Subject: [PATCH 01/13] feat: started working on DB connection chore: upgrade lavalink.kt Signed-off-by: limited_dev --- build.gradle.kts | 30 +++++++++++--- src/main/kotlin/de/limited_dev/botendo/Bot.kt | 25 +++++------ .../kotlin/de/limited_dev/botendo/Main.kt | 2 +- .../{util => data}/CredentialManager.kt | 2 +- .../kotlin/de/limited_dev/botendo/data/DB.kt | 41 +++++++++++++++++++ .../music/components/GuildTrackScheduler.kt | 29 ++++++------- .../music/components/MusicManager.kt | 2 +- .../botendo/extensions/util/InfoExtension.kt | 5 ++- .../botendo/build/BuildConstants.kt | 3 ++ 9 files changed, 100 insertions(+), 39 deletions(-) rename src/main/kotlin/de/limited_dev/botendo/{util => data}/CredentialManager.kt (98%) create mode 100644 src/main/kotlin/de/limited_dev/botendo/data/DB.kt diff --git a/build.gradle.kts b/build.gradle.kts index 2413c18..97469f7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,22 +22,25 @@ 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.0" val kordver = "1.5.6" -val lavaver = "3.8.0" +val lavaver = "4.0.0" val coroutinesver = "1.1.0" +val ktor_version = "2.3.0" +val exposedver = "0.40.1" +val postgresver = "42.3.8" val mavenArtifact = "Botendo" project.base.archivesName.set(mavenArtifact) @@ -77,11 +80,25 @@ 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") + + //Database + shadow("io.ktor:ktor-client-core:$ktor_version") + shadow("io.ktor:ktor-client-cio:$ktor_version") + shadow("org.jetbrains.exposed:exposed-core:$exposedver") + shadow("org.jetbrains.exposed:exposed-dao:$exposedver") + shadow("org.jetbrains.exposed:exposed-jdbc:$exposedver") + + shadow("org.postgresql:postgresql:$postgresver") } @@ -93,7 +110,10 @@ val templateProps = mapOf( "ownerID" to ownerID, "kordversion" to kordver, "lavaversion" to lavaver, - "coroutinesversion" to coroutinesver + "coroutinesversion" to coroutinesver, + "ktorversion" to ktor_version, + "exposedversion" to exposedver, + "postgresversion" to postgresver ) diff --git a/src/main/kotlin/de/limited_dev/botendo/Bot.kt b/src/main/kotlin/de/limited_dev/botendo/Bot.kt index 296088e..ac04a8f 100644 --- a/src/main/kotlin/de/limited_dev/botendo/Bot.kt +++ b/src/main/kotlin/de/limited_dev/botendo/Bot.kt @@ -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..de71e03 100644 --- a/src/main/kotlin/de/limited_dev/botendo/Main.kt +++ b/src/main/kotlin/de/limited_dev/botendo/Main.kt @@ -34,6 +34,6 @@ suspend fun main() { "M#########M \n" + " " ) - println("Bot v.${BuildConstants.version}, Kord Extensions v.${BuildConstants.kordVersion}, LavaKord v.${BuildConstants.lavaVersion}, Coroutines v.${BuildConstants.coroutinesVersion}") + println("Bot v.${BuildConstants.version}, Kord Extensions v.${BuildConstants.kordVersion}, LavaKord v.${BuildConstants.lavaVersion}, Coroutines v.${BuildConstants.coroutinesVersion}, Ktor v.${BuildConstants.ktorVersion}, Exposed v.${BuildConstants.exposedVersion}, Postgres v.${BuildConstants.postgresVersion}") Bot.start() } 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 98% 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..af04e33 100644 --- a/src/main/kotlin/de/limited_dev/botendo/util/CredentialManager.kt +++ b/src/main/kotlin/de/limited_dev/botendo/data/CredentialManager.kt @@ -17,7 +17,7 @@ * */ -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/data/DB.kt b/src/main/kotlin/de/limited_dev/botendo/data/DB.kt new file mode 100644 index 0000000..5ebd226 --- /dev/null +++ b/src/main/kotlin/de/limited_dev/botendo/data/DB.kt @@ -0,0 +1,41 @@ +/* + * Botendo + * Copyright (C) 2023 limited_dev + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +package de.limited_dev.botendo.data + +import de.limited_dev.botendo.util.Logger +import java.sql.Connection +import java.sql.DriverManager +import kotlin.system.exitProcess + +object DB { + private lateinit var connection: Connection + fun connect(dbDomain: String, dbName: String, dbUser: String, dbPasswd: String) { + val jdbcUrl = "jdbc:postgresql://$dbDomain/$dbName" + connection = DriverManager.getConnection(jdbcUrl, dbUser, dbPasswd) + + if (connection.isValid(0)) { + Logger.out("DB Connection Success!") + } else { + Logger.out("Could not connect to the Database!") + Logger.out("Check credentials.nils file.") + exitProcess(4) + } + } +} 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..5320e33 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 @@ -20,23 +20,20 @@ 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,7 @@ class GuildTrackScheduler(val pl: Player) { private suspend fun onTrackEnd(e: TrackEndEvent) { if (e.reason.mayStartNext) { if (repeating) { - this.pl.playTrack(e.track.copy()) + this.pl.playTrack(e.getTrack().copy()) return } Logger.out("Track has ended; Playing next...") @@ -88,12 +85,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 +99,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..8ee57ec 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 @@ -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() 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..8bca8d3 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 @@ -37,7 +37,10 @@ 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" + + "Ktor ***v." + BuildConstants.ktorVersion + "***\n" + + "Exposed ***v." + BuildConstants.exposedVersion + "***\n" + + "PostgreSQL ***v." + BuildConstants.postgresVersion + "***" ) } } diff --git a/src/main/templates/de/limited_dev/botendo/build/BuildConstants.kt b/src/main/templates/de/limited_dev/botendo/build/BuildConstants.kt index 8e33917..f001cee 100644 --- a/src/main/templates/de/limited_dev/botendo/build/BuildConstants.kt +++ b/src/main/templates/de/limited_dev/botendo/build/BuildConstants.kt @@ -25,4 +25,7 @@ internal object BuildConstants { const val kordVersion = "${kordversion}" const val lavaVersion = "${lavaversion}" const val coroutinesVersion = "${coroutinesversion}" + const val ktorVersion = "${ktorversion}" + const val exposedVersion = "${exposedversion}" + const val postgresVersion = "${postgresversion}" } From dfbd3fbe3955298228c4ef38d1d8ea10476bd58c Mon Sep 17 00:00:00 2001 From: limited_dev Date: Mon, 8 May 2023 23:24:29 +0200 Subject: [PATCH 02/13] feat!: removed DB connection, since I decided against storing user data. chore: updated Known issues Comment: Playlists were never used on v4, so there is no need for a DB for that, so I don't need one right now Signed-off-by: limited_dev --- README.md | 5 +++ build.gradle.kts | 19 ++------- .../kotlin/de/limited_dev/botendo/data/DB.kt | 41 ------------------- .../botendo/build/BuildConstants.kt | 3 -- 4 files changed, 9 insertions(+), 59 deletions(-) delete mode 100644 src/main/kotlin/de/limited_dev/botendo/data/DB.kt diff --git a/README.md b/README.md index 8455c81..369548b 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,11 @@ A Discord music bot, written in Kotlin using the kord library. - HopeBaron for helping me a whole lot +## Known issues + +- The Repeat feature does not function +- Not all comments are listed below + ## Commands - info -- Show basic infos about the bot diff --git a/build.gradle.kts b/build.gradle.kts index 97469f7..12da46b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -38,9 +38,7 @@ version = System.getenv("CI_COMMIT_TAG")?.let { "$it-${System.getenv("CI_COMMIT_ val kordver = "1.5.6" val lavaver = "4.0.0" val coroutinesver = "1.1.0" -val ktor_version = "2.3.0" -val exposedver = "0.40.1" -val postgresver = "42.3.8" +//val ffmpegver = "5.1.2-1.5.8" val mavenArtifact = "Botendo" project.base.archivesName.set(mavenArtifact) @@ -91,14 +89,8 @@ dependencies { shadow("org.slf4j:slf4j-api:2.0.3") shadow("org.slf4j:slf4j-simple:2.0.3") - //Database - shadow("io.ktor:ktor-client-core:$ktor_version") - shadow("io.ktor:ktor-client-cio:$ktor_version") - shadow("org.jetbrains.exposed:exposed-core:$exposedver") - shadow("org.jetbrains.exposed:exposed-dao:$exposedver") - shadow("org.jetbrains.exposed:exposed-jdbc:$exposedver") - - shadow("org.postgresql:postgresql:$postgresver") + //ffmpeg + //shadow("org.bytedeco:ffmpeg:$ffmpegver") } @@ -110,10 +102,7 @@ val templateProps = mapOf( "ownerID" to ownerID, "kordversion" to kordver, "lavaversion" to lavaver, - "coroutinesversion" to coroutinesver, - "ktorversion" to ktor_version, - "exposedversion" to exposedver, - "postgresversion" to postgresver + "coroutinesversion" to coroutinesver ) diff --git a/src/main/kotlin/de/limited_dev/botendo/data/DB.kt b/src/main/kotlin/de/limited_dev/botendo/data/DB.kt deleted file mode 100644 index 5ebd226..0000000 --- a/src/main/kotlin/de/limited_dev/botendo/data/DB.kt +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Botendo - * Copyright (C) 2023 limited_dev - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -package de.limited_dev.botendo.data - -import de.limited_dev.botendo.util.Logger -import java.sql.Connection -import java.sql.DriverManager -import kotlin.system.exitProcess - -object DB { - private lateinit var connection: Connection - fun connect(dbDomain: String, dbName: String, dbUser: String, dbPasswd: String) { - val jdbcUrl = "jdbc:postgresql://$dbDomain/$dbName" - connection = DriverManager.getConnection(jdbcUrl, dbUser, dbPasswd) - - if (connection.isValid(0)) { - Logger.out("DB Connection Success!") - } else { - Logger.out("Could not connect to the Database!") - Logger.out("Check credentials.nils file.") - exitProcess(4) - } - } -} diff --git a/src/main/templates/de/limited_dev/botendo/build/BuildConstants.kt b/src/main/templates/de/limited_dev/botendo/build/BuildConstants.kt index f001cee..8e33917 100644 --- a/src/main/templates/de/limited_dev/botendo/build/BuildConstants.kt +++ b/src/main/templates/de/limited_dev/botendo/build/BuildConstants.kt @@ -25,7 +25,4 @@ internal object BuildConstants { const val kordVersion = "${kordversion}" const val lavaVersion = "${lavaversion}" const val coroutinesVersion = "${coroutinesversion}" - const val ktorVersion = "${ktorversion}" - const val exposedVersion = "${exposedversion}" - const val postgresVersion = "${postgresversion}" } From 2e35bbd0c790b496920bcbe2d59de1900346ffa6 Mon Sep 17 00:00:00 2001 From: limited_dev Date: Tue, 9 May 2023 09:33:37 +0200 Subject: [PATCH 03/13] fix: removed nonexistent versions from info command chore: added an issue to known issues Signed-off-by: limited_dev --- README.md | 3 ++- .../extensions/music/components/GuildTrackScheduler.kt | 1 + .../limited_dev/botendo/extensions/util/InfoExtension.kt | 7 +++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 369548b..4fb6227 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,12 @@ A Discord music bot, written in Kotlin using the kord library. ## Special Thanks to -- HopeBaron for helping me a whole lot +- HopeBaron for helping me a lot ## Known issues - The Repeat feature does not function +- The Queue does not show the current song, if there is no song next up - Not all comments are listed below ## Commands 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 5320e33..0efb9f3 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 @@ -75,6 +75,7 @@ class GuildTrackScheduler(val pl: Player) { private suspend fun onTrackEnd(e: TrackEndEvent) { if (e.reason.mayStartNext) { if (repeating) { + Logger.out("Repeating track....") this.pl.playTrack(e.getTrack().copy()) return } 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 8bca8d3..34b151b 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 @@ -37,10 +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 + "***\n" + - "Ktor ***v." + BuildConstants.ktorVersion + "***\n" + - "Exposed ***v." + BuildConstants.exposedVersion + "***\n" + - "PostgreSQL ***v." + BuildConstants.postgresVersion + "***" + "Coroutines ***v." + BuildConstants.coroutinesVersion + "***\n\n\n" + + "***Bot made by moonleay#7441***\n" + + "(c) 2023, licensed under GPL-3.0" ) } } From 47139212790f9a29818a72ef59913e425f0f64a7 Mon Sep 17 00:00:00 2001 From: limited_dev Date: Tue, 9 May 2023 09:36:34 +0200 Subject: [PATCH 04/13] fix: removed nonexistent versions from boot Signed-off-by: limited_dev --- src/main/kotlin/de/limited_dev/botendo/Main.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/de/limited_dev/botendo/Main.kt b/src/main/kotlin/de/limited_dev/botendo/Main.kt index de71e03..59b9dd8 100644 --- a/src/main/kotlin/de/limited_dev/botendo/Main.kt +++ b/src/main/kotlin/de/limited_dev/botendo/Main.kt @@ -34,6 +34,6 @@ suspend fun main() { "M#########M \n" + " " ) - println("Bot v.${BuildConstants.version}, Kord Extensions v.${BuildConstants.kordVersion}, LavaKord v.${BuildConstants.lavaVersion}, Coroutines v.${BuildConstants.coroutinesVersion}, Ktor v.${BuildConstants.ktorVersion}, Exposed v.${BuildConstants.exposedVersion}, Postgres v.${BuildConstants.postgresVersion}") + println("Bot v.${BuildConstants.version}, Kord Extensions v.${BuildConstants.kordVersion}, LavaKord v.${BuildConstants.lavaVersion}, Coroutines v.${BuildConstants.coroutinesVersion}") Bot.start() } From e5af032be88151bc93b24743b11af6aebcdec63b Mon Sep 17 00:00:00 2001 From: limited_dev Date: Thu, 11 May 2023 07:43:35 +0200 Subject: [PATCH 05/13] chore: update copyright Signed-off-by: limited_dev --- gradle.properties | 24 +++++++++---------- gradle/wrapper/gradle-wrapper.properties | 24 +++++++++---------- gradlew | 24 +++++++++---------- src/main/kotlin/de/limited_dev/botendo/Bot.kt | 24 +++++++++---------- .../kotlin/de/limited_dev/botendo/Main.kt | 24 +++++++++---------- .../de/limited_dev/botendo/buttons/Button.kt | 24 +++++++++---------- .../botendo/buttons/ButtonManager.kt | 24 +++++++++---------- .../botendo/buttons/music/PauseButton.kt | 24 +++++++++---------- .../botendo/buttons/music/QueueButton.kt | 24 +++++++++---------- .../botendo/buttons/music/RepeatButton.kt | 24 +++++++++---------- .../botendo/buttons/music/SkipButton.kt | 24 +++++++++---------- .../botendo/buttons/music/StopButton.kt | 24 +++++++++---------- .../botendo/data/CredentialManager.kt | 24 +++++++++---------- .../extensions/music/NowPlayingExtension.kt | 24 +++++++++---------- .../botendo/extensions/music/PlayExtension.kt | 24 +++++++++---------- .../extensions/music/QueueExtension.kt | 24 +++++++++---------- .../botendo/extensions/music/SkipExtension.kt | 24 +++++++++---------- .../botendo/extensions/music/StopExtension.kt | 24 +++++++++---------- .../music/components/GuildTrackScheduler.kt | 24 +++++++++---------- .../music/components/MusicManager.kt | 24 +++++++++---------- .../botendo/extensions/util/InfoExtension.kt | 24 +++++++++---------- .../extensions/util/PotatoExtension.kt | 24 +++++++++---------- .../de/limited_dev/botendo/util/ButtonUtil.kt | 24 +++++++++---------- .../de/limited_dev/botendo/util/Logger.kt | 24 +++++++++---------- .../limited_dev/botendo/util/MessageUtil.kt | 24 +++++++++---------- .../de/limited_dev/botendo/util/Status.kt | 24 +++++++++---------- .../de/limited_dev/botendo/util/TimeUtil.kt | 24 +++++++++---------- .../de/limited_dev/botendo/util/UrlUtil.kt | 24 +++++++++---------- src/main/resources/simplelogger.properties | 24 +++++++++---------- 29 files changed, 348 insertions(+), 348 deletions(-) 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 ac04a8f..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 . * */ 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/data/CredentialManager.kt b/src/main/kotlin/de/limited_dev/botendo/data/CredentialManager.kt index af04e33..78868fa 100644 --- a/src/main/kotlin/de/limited_dev/botendo/data/CredentialManager.kt +++ b/src/main/kotlin/de/limited_dev/botendo/data/CredentialManager.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/NowPlayingExtension.kt b/src/main/kotlin/de/limited_dev/botendo/extensions/music/NowPlayingExtension.kt index cb0f1d5..00fb3ec 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 . * */ 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..b05a5e2 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 . * */ 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..9d1f6cb 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 . * */ 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..486d8f9 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 . * */ 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 0efb9f3..dd09e82 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,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/MusicManager.kt b/src/main/kotlin/de/limited_dev/botendo/extensions/music/components/MusicManager.kt index 8ee57ec..2b9a3ba 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 . * */ 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 34b151b..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 . * */ 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..c900635 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 . * */ 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..5f1132d 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 . * */ 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 . # # From 5abfad091df84d99606501335a34a9a123b79464 Mon Sep 17 00:00:00 2001 From: limited_dev Date: Thu, 11 May 2023 08:06:40 +0200 Subject: [PATCH 06/13] fix: fixed action row not adding and causing issues Signed-off-by: limited_dev --- .../botendo/extensions/music/NowPlayingExtension.kt | 7 ++++++- .../limited_dev/botendo/extensions/music/PlayExtension.kt | 1 - .../limited_dev/botendo/extensions/music/QueueExtension.kt | 7 ++++++- .../limited_dev/botendo/extensions/music/SkipExtension.kt | 7 ++++++- 4 files changed, 18 insertions(+), 4 deletions(-) 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 00fb3ec..39c9333 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 @@ -85,7 +85,12 @@ class NowPlayingExtension : 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/PlayExtension.kt b/src/main/kotlin/de/limited_dev/botendo/extensions/music/PlayExtension.kt index b05a5e2..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 @@ -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 9d1f6cb..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 @@ -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 486d8f9..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 @@ -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 + ) } } } From 7a20ad8088038f6cec806147e6c1ff47712d320e Mon Sep 17 00:00:00 2001 From: limited_dev Date: Thu, 11 May 2023 08:13:56 +0200 Subject: [PATCH 07/13] fix: fixed nowplaying command not working Signed-off-by: limited_dev --- README.md | 2 +- .../botendo/extensions/music/NowPlayingExtension.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4fb6227..81bd739 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ A Discord music bot, written in Kotlin using the kord library. ## Known issues - The Repeat feature does not function -- The Queue does not show the current song, if there is no song next up +- The nowplaying command always shows the current position of the track at 0s - Not all comments are listed below ## Commands 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 39c9333..13e8d1c 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 @@ -79,8 +79,8 @@ 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" ) ) From 997b25e6598e51defe01b3d1b314370802365248 Mon Sep 17 00:00:00 2001 From: limited_dev Date: Thu, 11 May 2023 08:18:42 +0200 Subject: [PATCH 08/13] chore: optimized code to remove warnings Signed-off-by: limited_dev --- src/main/kotlin/de/limited_dev/botendo/util/Logger.kt | 2 +- src/main/kotlin/de/limited_dev/botendo/util/TimeUtil.kt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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 c900635..4e6baf9 100644 --- a/src/main/kotlin/de/limited_dev/botendo/util/Logger.kt +++ b/src/main/kotlin/de/limited_dev/botendo/util/Logger.kt @@ -31,7 +31,7 @@ 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() 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 5f1132d..2c914dd 100644 --- a/src/main/kotlin/de/limited_dev/botendo/util/TimeUtil.kt +++ b/src/main/kotlin/de/limited_dev/botendo/util/TimeUtil.kt @@ -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) From 0d8001b9515bd24807e8fe87e36e60b9f549b027 Mon Sep 17 00:00:00 2001 From: limited_dev Date: Thu, 11 May 2023 08:21:14 +0200 Subject: [PATCH 09/13] chore: updated logger comments Signed-off-by: limited_dev --- src/main/kotlin/de/limited_dev/botendo/util/Logger.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 4e6baf9..dc5af6d 100644 --- a/src/main/kotlin/de/limited_dev/botendo/util/Logger.kt +++ b/src/main/kotlin/de/limited_dev/botendo/util/Logger.kt @@ -37,6 +37,6 @@ object Logger { e.printStackTrace() } // Ich kann nicht mehr - // [Klasse.Funktion] [T/M HH:MM] + // [Class.function] [T/M HH:MM] } } From 098634ee3f2764b77495bae4fce42aeca2cd672f Mon Sep 17 00:00:00 2001 From: limited_dev Date: Thu, 11 May 2023 08:29:54 +0200 Subject: [PATCH 10/13] chore: updated README.md Signed-off-by: limited_dev --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 81bd739..86895c3 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A Discord music bot, written in Kotlin using the kord library. ## Contributors
- limited_dev: Owner & Developer + moonleay: Head Developer
## Special Thanks to @@ -23,13 +23,18 @@ A Discord music bot, written in Kotlin using the kord library. - The Repeat feature does not function - The nowplaying command always shows the current position of the track at 0s -- Not all comments are listed below -## Commands +## Commands & Features -- info -- Show basic infos about the bot -- play -- Play a song -- stop -- Stop playing a song and leave the vc +- 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) From 47b3674b6e809ec88eb18f86d8e80d945ed6e358 Mon Sep 17 00:00:00 2001 From: limited_dev Date: Thu, 11 May 2023 08:31:04 +0200 Subject: [PATCH 11/13] chore: updated build.gradle.kts to the next Docker release version, updated build.gradle.kts Signed-off-by: limited_dev --- build.gradle.kts | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 12da46b..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 . * */ @@ -33,12 +33,11 @@ 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.3.0" + ?: "6.3.3" val kordver = "1.5.6" val lavaver = "4.0.0" val coroutinesver = "1.1.0" -//val ffmpegver = "5.1.2-1.5.8" val mavenArtifact = "Botendo" project.base.archivesName.set(mavenArtifact) @@ -88,9 +87,6 @@ dependencies { //Logging shadow("org.slf4j:slf4j-api:2.0.3") shadow("org.slf4j:slf4j-simple:2.0.3") - - //ffmpeg - //shadow("org.bytedeco:ffmpeg:$ffmpegver") } From 27aee06681341e84d789b6a10d27147bd18e5a8d Mon Sep 17 00:00:00 2001 From: limited_dev Date: Thu, 11 May 2023 08:55:02 +0200 Subject: [PATCH 12/13] fix: repeating function repeats now Signed-off-by: limited_dev --- README.md | 1 - .../botendo/extensions/music/components/GuildTrackScheduler.kt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 86895c3..9e1b2a3 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ A Discord music bot, written in Kotlin using the kord library. ## Known issues -- The Repeat feature does not function - The nowplaying command always shows the current position of the track at 0s ## Commands & Features 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 dd09e82..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 @@ -75,7 +75,7 @@ class GuildTrackScheduler(val pl: Player) { private suspend fun onTrackEnd(e: TrackEndEvent) { if (e.reason.mayStartNext) { if (repeating) { - Logger.out("Repeating track....") + Logger.out("Repeating track...") this.pl.playTrack(e.getTrack().copy()) return } From 723709563665b06d82f8b01fffdf3da5d165cbe5 Mon Sep 17 00:00:00 2001 From: limited_dev Date: Thu, 11 May 2023 09:09:58 +0200 Subject: [PATCH 13/13] fix: nowplaying command now shows the current position of the track Signed-off-by: limited_dev --- README.md | 2 +- .../botendo/extensions/music/NowPlayingExtension.kt | 4 ++-- .../botendo/extensions/music/components/MusicManager.kt | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9e1b2a3..4992739 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ A Discord music bot, written in Kotlin using the kord library. ## Known issues -- The nowplaying command always shows the current position of the track at 0s +- None (currently). Report issues to issues@moonleay.net or moonleay#7441 ## Commands & Features 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 13e8d1c..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 @@ -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( 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 2b9a3ba..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 @@ -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 )