From 23897121d324b2ea204d54eac06ec2572e87395c Mon Sep 17 00:00:00 2001 From: "Benjamin A. Shelton" Date: Thu, 8 Oct 2026 21:22:11 -0600 Subject: [PATCH] Added commands. --- cmd/bot/main.go | 20 ++++++++++++++++++++ internal/commands/common.go | 5 +++++ internal/commands/verse.go | 24 ++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 internal/commands/verse.go diff --git a/cmd/bot/main.go b/cmd/bot/main.go index 5c22a81..076f90a 100644 --- a/cmd/bot/main.go +++ b/cmd/bot/main.go @@ -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"}, + }, + },*/ + }, + }, }, }, } diff --git a/internal/commands/common.go b/internal/commands/common.go index c7218ea..de8e280 100644 --- a/internal/commands/common.go +++ b/internal/commands/common.go @@ -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 +} diff --git a/internal/commands/verse.go b/internal/commands/verse.go new file mode 100644 index 0000000..f7781af --- /dev/null +++ b/internal/commands/verse.go @@ -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 +}