Set build hash and pipeline link through LDFlags

Add custom command values to config
This commit is contained in:
Michał Gdula 2025-04-24 19:32:32 +01:00
parent eb50802d1e
commit a0bb37fc06
5 changed files with 36 additions and 21 deletions

15
main.go
View file

@ -11,11 +11,20 @@ import (
"github.com/bwmarrin/discordgo"
)
var ConfigBuildHash string
var ConfigBuildPipeline string
func main() {
a := app.NewApp(app.Config{
Prefix: ">",
Token: os.Getenv("TOKEN"),
Intents: discordgo.IntentsGuildMessages,
BotPrefix: ">",
BotToken: os.Getenv("TOKEN"),
BotIntents: discordgo.IntentsGuildMessages,
CommandExtras: map[string]string{
"debug_build-hash": ConfigBuildHash,
"debug_build-pipeline": ConfigBuildPipeline,
"e621_username": os.Getenv("E621_USERNAME"),
"e621_password": os.Getenv("E621_PASSWORD"),
},
})
debug.RegisterDebugCommands(a)