CLEAN UP THE CODE AGAIN RAAAAAAAAAAH

This commit is contained in:
Michał Gdula 2025-05-08 20:33:47 +01:00
parent fbb0b61556
commit 972e1371fd
10 changed files with 137 additions and 188 deletions

27
main.go
View file

@ -3,7 +3,7 @@ package main
import (
"os"
"github.com/Fluffy-Bean/lynxie/app"
"github.com/Fluffy-Bean/lynxie/internal/handler"
"github.com/Fluffy-Bean/lynxie/pkg/commands/debug"
"github.com/Fluffy-Bean/lynxie/pkg/commands/img"
"github.com/Fluffy-Bean/lynxie/pkg/commands/porb"
@ -11,26 +11,13 @@ import (
"github.com/bwmarrin/discordgo"
)
var ConfigBuildHash string
var ConfigBuildPipeline string
func main() {
a := app.NewApp(app.Config{
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"),
},
})
bot := handler.NewBot(">", os.Getenv("TOKEN"), discordgo.IntentsGuildMessages)
debug.RegisterDebugCommands(a)
img.RegisterImgCommands(a)
tinyfox.RegisterTinyfoxCommands(a)
porb.RegisterPorbCommands(a)
debug.RegisterDebugCommands(bot)
img.RegisterImgCommands(bot)
tinyfox.RegisterTinyfoxCommands(bot)
porb.RegisterPorbCommands(bot)
a.Run()
bot.Run()
}