discord embed changes

This commit is contained in:
Sotirios Pupakis
2025-09-07 05:13:06 +02:00
parent 557eedf02f
commit 64d9f51f19
7 changed files with 58 additions and 53 deletions

View File

@@ -16,6 +16,7 @@ var IP string
var SECRET string
var DB_NAME string
var DiscordWebhook string
var ADMIN_SECRET string
func ConnectToDB() {
db, err := gorm.Open(sqlite.Open(DB_NAME), &gorm.Config{})
@@ -34,6 +35,7 @@ type Configuration struct {
Secret string `yaml:"secret"`
DB string `yaml:"db"`
DiscordWebhook string `yaml:"discordWebhook"`
ADMIN_SECRET string `yaml:"adminSecret"`
}
func Load() {
@@ -55,4 +57,5 @@ file, err := os.ReadFile("config.yaml")
SECRET = configuration.Secret
DB_NAME = configuration.DB
DiscordWebhook = configuration.DiscordWebhook
ADMIN_SECRET = configuration.ADMIN_SECRET
}