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 <loginakkisativ@gmail.com>
This commit is contained in:
parent
8ac643bbe8
commit
dfbd3fbe39
4 changed files with 9 additions and 59 deletions
|
@ -19,6 +19,11 @@ A Discord music bot, written in Kotlin using the kord library.
|
||||||
|
|
||||||
- HopeBaron for helping me a whole lot
|
- HopeBaron for helping me a whole lot
|
||||||
|
|
||||||
|
## Known issues
|
||||||
|
|
||||||
|
- The Repeat feature does not function
|
||||||
|
- Not all comments are listed below
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
- info -- Show basic infos about the bot
|
- info -- Show basic infos about the bot
|
||||||
|
|
|
@ -38,9 +38,7 @@ version = System.getenv("CI_COMMIT_TAG")?.let { "$it-${System.getenv("CI_COMMIT_
|
||||||
val kordver = "1.5.6"
|
val kordver = "1.5.6"
|
||||||
val lavaver = "4.0.0"
|
val lavaver = "4.0.0"
|
||||||
val coroutinesver = "1.1.0"
|
val coroutinesver = "1.1.0"
|
||||||
val ktor_version = "2.3.0"
|
//val ffmpegver = "5.1.2-1.5.8"
|
||||||
val exposedver = "0.40.1"
|
|
||||||
val postgresver = "42.3.8"
|
|
||||||
|
|
||||||
val mavenArtifact = "Botendo"
|
val mavenArtifact = "Botendo"
|
||||||
project.base.archivesName.set(mavenArtifact)
|
project.base.archivesName.set(mavenArtifact)
|
||||||
|
@ -91,14 +89,8 @@ dependencies {
|
||||||
shadow("org.slf4j:slf4j-api:2.0.3")
|
shadow("org.slf4j:slf4j-api:2.0.3")
|
||||||
shadow("org.slf4j:slf4j-simple:2.0.3")
|
shadow("org.slf4j:slf4j-simple:2.0.3")
|
||||||
|
|
||||||
//Database
|
//ffmpeg
|
||||||
shadow("io.ktor:ktor-client-core:$ktor_version")
|
//shadow("org.bytedeco:ffmpeg:$ffmpegver")
|
||||||
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")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,10 +102,7 @@ val templateProps = mapOf(
|
||||||
"ownerID" to ownerID,
|
"ownerID" to ownerID,
|
||||||
"kordversion" to kordver,
|
"kordversion" to kordver,
|
||||||
"lavaversion" to lavaver,
|
"lavaversion" to lavaver,
|
||||||
"coroutinesversion" to coroutinesver,
|
"coroutinesversion" to coroutinesver
|
||||||
"ktorversion" to ktor_version,
|
|
||||||
"exposedversion" to exposedver,
|
|
||||||
"postgresversion" to postgresver
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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 <https://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -25,7 +25,4 @@ internal object BuildConstants {
|
||||||
const val kordVersion = "${kordversion}"
|
const val kordVersion = "${kordversion}"
|
||||||
const val lavaVersion = "${lavaversion}"
|
const val lavaVersion = "${lavaversion}"
|
||||||
const val coroutinesVersion = "${coroutinesversion}"
|
const val coroutinesVersion = "${coroutinesversion}"
|
||||||
const val ktorVersion = "${ktorversion}"
|
|
||||||
const val exposedVersion = "${exposedversion}"
|
|
||||||
const val postgresVersion = "${postgresversion}"
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue