Trying some weird training nonsense. Maybe this will be fun.
All checks were successful
Docker Deploy / build-and-push (push) Successful in 3m23s

This commit is contained in:
2026-01-20 14:48:53 -07:00
parent 0081978489
commit 9694a42f3f
49 changed files with 190186 additions and 159 deletions

16
main.go
View File

@@ -29,6 +29,10 @@ func main() {
initCommands(config)
initCommandHandlers(config)
if err := command.InitBard("datasets/bard.gob"); err != nil {
log.Printf("Failed to load Bard dataset: %v", err)
}
err := lib.InitDB()
if err != nil {
log.Fatalf("Failed to initialize database: %v", err)
@@ -191,13 +195,13 @@ func initCommands(config *lib.Config) {
},
},
{
Name: "gen",
Description: "Generate a random message using markov chains based on channel history",
Name: "bard",
Description: "Ask the bard a question",
Options: []*discordgo.ApplicationCommandOption{
{
Type: discordgo.ApplicationCommandOptionInteger,
Name: "messages",
Description: fmt.Sprintf("Number of messages to use (default: %d, max: %d)", config.MarkovDefaultMessages, config.MarkovMaxMessages),
Type: discordgo.ApplicationCommandOptionString,
Name: "question",
Description: "The question you want to ask",
Required: false,
},
},
@@ -255,7 +259,7 @@ func initCommandHandlers(config *lib.Config) {
commandHandlers = map[string]func(s *discordgo.Session, i *discordgo.InteractionCreate){
"ping": lib.HandleCommand("ping", time.Duration(config.PingCooldown)*time.Second, command.PingCommand),
"hs": lib.HandleCommand("hs", time.Duration(config.HsCooldown)*time.Second, command.HsCommand),
"gen": lib.HandleCommand("gen", time.Duration(config.MarkovCooldown)*time.Second, command.MarkovCommand),
"bard": lib.HandleCommand("bard", time.Duration(config.MarkovCooldown)*time.Second, command.BardCommand),
"ask": lib.HandleCommand("ask", time.Duration(config.MarkovAskCooldown)*time.Second, command.MarkovQuestionCommand),
"himbucks": lib.HandleCommand("himbucks", time.Duration(config.HimbucksCooldown)*time.Second, command.BalanceGetCommand),
"himboard": lib.HandleCommand("himboard", time.Duration(config.HimboardCooldown)*time.Second, command.LeaderboardCommand),