dotenv handling moved, rename run -> start
This commit is contained in:
parent
7ccf2b2073
commit
823c114db0
1 changed files with 3 additions and 7 deletions
|
|
@ -10,7 +10,6 @@ import (
|
||||||
"slices"
|
"slices"
|
||||||
_ "sync"
|
_ "sync"
|
||||||
|
|
||||||
"github.com/joho/godotenv"
|
|
||||||
"github.com/mymmrac/telego"
|
"github.com/mymmrac/telego"
|
||||||
th "github.com/mymmrac/telego/telegohandler"
|
th "github.com/mymmrac/telego/telegohandler"
|
||||||
"github.com/robfig/cron/v3"
|
"github.com/robfig/cron/v3"
|
||||||
|
|
@ -37,10 +36,6 @@ func main() {
|
||||||
rootfs = vfs.MustVFS(vfs.NewVFS(root))
|
rootfs = vfs.MustVFS(vfs.NewVFS(root))
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := godotenv.Load(); err != nil {
|
|
||||||
panic(fmt.Sprintf("dotenv: %s", err))
|
|
||||||
}
|
|
||||||
|
|
||||||
cmdHost, err := commands.NewCommandHost(rootfs)
|
cmdHost, err := commands.NewCommandHost(rootfs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("unable to configure host:", errors.Unfurl(err))
|
logger.Error("unable to configure host:", errors.Unfurl(err))
|
||||||
|
|
@ -133,8 +128,9 @@ func main() {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "run",
|
Name: "start",
|
||||||
Description: "Run the bot.",
|
Description: "Start the bot.",
|
||||||
|
Action: cmdHost.App().Start,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "verse",
|
Name: "verse",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue