diff --git a/cmd/bot/command.go b/cmd/bot/command.go index 3c827ed..b84c8fc 100644 --- a/cmd/bot/command.go +++ b/cmd/bot/command.go @@ -97,8 +97,8 @@ func (app *Application) EditCommandLevel(name, lvl string, message twitch.Privat } } -// EditCommandLevel takes in a name and level string and updates the entry with name -// to the supplied level value. +// EditCommandCategory takes in a name and category string and updates the command +// in the databse with the passed in new category. func (app *Application) EditCommandCategory(name, category string, message twitch.PrivateMessage) { err := app.Models.Commands.SetCategory(name, category) diff --git a/internal/data/commands.go b/internal/data/commands.go index de2e202..a38ec73 100644 --- a/internal/data/commands.go +++ b/internal/data/commands.go @@ -99,7 +99,7 @@ func (c CommandModel) SetLevel(name string, level int) error { // Insert adds a command into the database. func (c CommandModel) Insert(name, text string) error { perms := 0 - category := "default" + category := "uncategorized" query := ` INSERT into commands(name, text, category, level) VALUES ($1, $2, $3, $4)