cmd

package
v0.0.0-...-f967f41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	Coc           Coc           `cmd:"" help:"Link to the Code Of Conduct of BcnEng"`
	Netiquette    Netiquette    `cmd:"" help:"Link to the Netiquette of BcnEng"`
	Staff         Staff         `cmd:"" help:"Info about the staff behind BcnEng"`
	Version       Version       `cmd:"" help:"Info about the staff behind BcnEng"`
	Candebirthday CandeBirthday `cmd:"" help:"Days until @sdecandelario birthday!"`
	Echo          Echo          `cmd:"" help:"Sends a message from the bot user" placeholder:"echo #general Hi folks!"`
	Contest       Contest       `cmd:"" help:"Runs a contest on Twitter"`
	Help          Help          `cmd:""`
}

func NewCLI

func NewCLI(name string, args []string, options ...kong.Option) (*CLI, *kong.Context, error)

type CandeBirthday

type CandeBirthday struct{}

func (*CandeBirthday) Run

func (c *CandeBirthday) Run(cliCtx *kong.Context, ctx bot.Context, slackCtx bot.SlackContext) error

type Coc

type Coc struct{}

func (*Coc) Run

func (c *Coc) Run(cliCtx *kong.Context, ctx bot.Context, slackCtx bot.SlackContext) error

type Contest

type Contest struct {
	TweetID         string `arg:"" required:"false"`
	Pick            string `arg:"" required:"false"`
	AccountToFollow string `arg:"" optional:"false"`
}

func (*Contest) Run

func (c *Contest) Run(ctx bot.Context, slackCtx bot.SlackContext) error

type Echo

type Echo struct {
	Channel string `arg:"" required:"false"`
	Message string `arg:"" required:"false"`
}

func (*Echo) Run

func (e *Echo) Run(ctx bot.Context, slackCtx bot.SlackContext) error

type Help

type Help struct{}

func (*Help) Run

func (c *Help) Run(cliCtx *kong.Context, _ bot.Context, _ bot.SlackContext) error

type Netiquette

type Netiquette struct{}

func (*Netiquette) Run

func (c *Netiquette) Run(cliCtx *kong.Context, ctx bot.Context, slackCtx bot.SlackContext) error

type Staff

type Staff struct{}

func (*Staff) Run

func (c *Staff) Run(cliCtx *kong.Context, ctx bot.Context, slackCtx bot.SlackContext) error

type Version

type Version struct{}

func (*Version) Run

func (c *Version) Run(cliCtx *kong.Context, ctx bot.Context, slackCtx bot.SlackContext) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL