mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
set default command category to uncategorized instead of default
This commit is contained in:
parent
96eedbe293
commit
4125967c63
|
@ -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
|
// EditCommandCategory takes in a name and category string and updates the command
|
||||||
// to the supplied level value.
|
// in the databse with the passed in new category.
|
||||||
func (app *Application) EditCommandCategory(name, category string, message twitch.PrivateMessage) {
|
func (app *Application) EditCommandCategory(name, category string, message twitch.PrivateMessage) {
|
||||||
err := app.Models.Commands.SetCategory(name, category)
|
err := app.Models.Commands.SetCategory(name, category)
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ func (c CommandModel) SetLevel(name string, level int) error {
|
||||||
// Insert adds a command into the database.
|
// Insert adds a command into the database.
|
||||||
func (c CommandModel) Insert(name, text string) error {
|
func (c CommandModel) Insert(name, text string) error {
|
||||||
perms := 0
|
perms := 0
|
||||||
category := "default"
|
category := "uncategorized"
|
||||||
query := `
|
query := `
|
||||||
INSERT into commands(name, text, category, level)
|
INSERT into commands(name, text, category, level)
|
||||||
VALUES ($1, $2, $3, $4)
|
VALUES ($1, $2, $3, $4)
|
||||||
|
|
Loading…
Reference in a new issue