mirror of
https://github.com/jimeh/mje.git
synced 2026-02-19 09:56:41 +00:00
31 lines
524 B
Go
31 lines
524 B
Go
package commands
|
|
|
|
import (
|
|
"github.com/jimeh/go-midjourney"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func NewMidjourney(mc *midjourney.Client) (*cobra.Command, error) {
|
|
cmd := &cobra.Command{
|
|
Use: "midjourney",
|
|
Aliases: []string{"mj"},
|
|
Short: "Query the Midjourney API directly",
|
|
}
|
|
|
|
recentJobsCmd, err := NewMidjourneyRecentJobs(mc)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
wordsCmd, err := NewMidjourneyWords(mc)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
cmd.AddCommand(
|
|
recentJobsCmd,
|
|
wordsCmd,
|
|
)
|
|
|
|
return cmd, nil
|
|
}
|