Add chat management.
Presently this only allows adding a chat to the bot.
This commit is contained in:
parent
d8ee0f8c16
commit
6a02e2f4fe
4 changed files with 100 additions and 2 deletions
|
|
@ -57,6 +57,29 @@ func main() {
|
|||
},
|
||||
},
|
||||
Commands: []*cli.Command{
|
||||
{
|
||||
Name: "chats",
|
||||
Description: "Chats management",
|
||||
Commands: []*cli.Command{
|
||||
{
|
||||
Name: "add",
|
||||
Description: "Adds a chat to the bot. This is analogous to running /start within a chat.",
|
||||
Action: cmdHost.Chats().AddChat,
|
||||
Flags: []cli.Flag{
|
||||
&cli.IntFlag{
|
||||
Name: "id",
|
||||
Aliases: []string{"i"},
|
||||
Usage: "Specifies the chat id.",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "name",
|
||||
Aliases: []string{"n"},
|
||||
Usage: "Specifies the chat name.",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "init",
|
||||
Description: "Initialize the bot, its database, and prepare for first run.",
|
||||
|
|
|
|||
Loading…
Reference in a new issue