Added commands.

This commit is contained in:
Benjamin A. Shelton 2026-10-08 21:22:11 -06:00
commit 23897121d3
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01
3 changed files with 49 additions and 0 deletions

View file

@ -116,6 +116,26 @@ func main() {
{
Name: "verse",
Description: "Bible verse helpers and tools.",
Commands: []*cli.Command{
{
Name: "add",
Description: "Add a verse to the random rotation.",
Action: cmdHost.Verse().AddVerse,
/*//Future implementation.
Flags: []cli.Flag{
&cli.StringFlag{
Name: "translation",
Usage: "Specifies which translation this verse should be included from.",
Aliases: []string{"t"},
},
&cli.StringFlag{
Name: "date",
Usage: "Specifies a date for the provided verse to be displayed. Overrides random rotation. Use with caution as this will override random verses for all connected chats.",
Aliases: []string{"d"},
},
},*/
},
},
},
},
}

View file

@ -8,6 +8,7 @@ import (
type commands struct {
root vfs.VFS
meta *metadata
verse *verse
settings *settings.Settings
}
@ -34,3 +35,7 @@ func (c *commands) Initalizer() *installer {
func (c *commands) Meta() *metadata {
return c.meta
}
func (c *commands) Verse() *verse {
return c.verse
}

View file

@ -0,0 +1,24 @@
package commands
import (
"context"
"fmt"
"code.destrealm.net/zancarius/justusbot/internal/settings"
"github.com/urfave/cli/v3"
"go.destrealm.net/vfs"
)
type verse struct {
fs vfs.VFS
settings *settings.Settings
}
func (m *verse) AddVerse(ctx context.Context, cmd *cli.Command) error {
format := cmd.String("format")
_ = format
fmt.Println(cmd.Args())
fmt.Println("dump")
return nil
}