File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 99
1010var db * sql.DB
1111
12- func InitDB () {
12+ func InitDB (dbPath string ) {
1313 var err error
14- db , err = sql .Open ("sqlite3" , "rules.db" )
14+ db , err = sql .Open ("sqlite3" , dbPath )
1515 if err != nil {
1616 logger .Fatal ("Failed to open database: %v" , err )
1717 }
Original file line number Diff line number Diff line change @@ -23,10 +23,11 @@ func main() {
2323 botGuildID := config .GetEnv ("BOT_GUILD_ID" , true )
2424 servicesPortsPros := config .GetEnv ("SERVICES" , true )
2525 deleteCommands := config .GetEnv ("DELETE_COMMADS" , false ) == "true"
26- adminIDs := config .GetEnv ("ADMIN_IDS" , false )
26+ adminIDs := config .GetEnv ("ADMIN_IDS" , true )
27+ dbPath := config .GetEnv ("DB_PATH" , true )
2728
2829 // Initialize modules
29- database .InitDB ()
30+ database .InitDB (dbPath )
3031 firewall .InitFirewall (servicesPortsPros )
3132 bot .InitBot ()
3233 services .InitServices (adminIDs )
You can’t perform that action at this time.
0 commit comments