Bug fixes, rendering fixes, and added list all/add birthdays.
This commit is contained in:
parent
91d49f65ec
commit
e91413a238
3 changed files with 185 additions and 9 deletions
|
|
@ -47,6 +47,45 @@ func main() {
|
|||
Name: "birthdays",
|
||||
Description: "Birthday management",
|
||||
Commands: []*cli.Command{
|
||||
{
|
||||
Name: "add",
|
||||
Description: "Adds a birthday to the roster. Chat ID and name required.",
|
||||
Action: cmdHost.Birthdays().AddBirthday,
|
||||
Flags: []cli.Flag{
|
||||
&cli.Int64Flag{
|
||||
Name: "chatid",
|
||||
Aliases: []string{"c"},
|
||||
Usage: "Specifies the chat ID. Required.",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "name",
|
||||
Aliases: []string{"n"},
|
||||
Usage: "User's name. The user does not have to be present in the specified chat.",
|
||||
},
|
||||
&cli.Int64Flag{
|
||||
Name: "userid",
|
||||
Aliases: []string{"u"},
|
||||
Usage: "User ID. The user must be present in the specified chat if this flag is provided.",
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "birthday-id",
|
||||
Aliases: []string{"b"},
|
||||
Usage: "Birthday ID. Use this flag to update a given birthday. This can be used to change the birthday's date or to attach a user ID with a previously entered birthday.",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "list",
|
||||
Description: "Lists all birthdays in the current roster for the specified chat ID.",
|
||||
Action: cmdHost.Birthdays().ListBirthdays,
|
||||
Flags: []cli.Flag{
|
||||
&cli.Int64Flag{
|
||||
Name: "chatid",
|
||||
Aliases: []string{"c"},
|
||||
Usage: "Specifies the chat ID. Required.",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "weekly",
|
||||
Description: "Lists the weekly birthdays for this week.",
|
||||
|
|
|
|||
Loading…
Reference in a new issue