From 4125967c63128554d0d71e7be56ebbbe96a17f55 Mon Sep 17 00:00:00 2001 From: lyx0 <66651385+lyx0@users.noreply.github.com> Date: Mon, 15 Aug 2022 13:53:07 +0200 Subject: [PATCH] set default command category to uncategorized instead of default --- cmd/bot/command.go | 4 ++-- internal/data/commands.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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)