Add chat management.

Presently this only allows adding a chat to the bot.
This commit is contained in:
Benjamin A. Shelton 2026-10-14 14:26:18 -06:00
commit 6a02e2f4fe
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01
4 changed files with 100 additions and 2 deletions

View file

@ -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.",