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
|
@ -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 lavaVersion = "${lavaversion}"
|
||||
const val coroutinesVersion = "${coroutinesversion}"
|
||||
const val ktorVersion = "${ktorversion}"
|
||||
const val exposedVersion = "${exposedversion}"
|
||||
const val postgresVersion = "${postgresversion}"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue