Added preliminary announcement code.
This commit is contained in:
parent
84e624a91b
commit
3fafe8455a
4 changed files with 95 additions and 12 deletions
|
|
@ -43,6 +43,56 @@ func main() {
|
|||
},
|
||||
},
|
||||
Commands: []*cli.Command{
|
||||
{
|
||||
Name: "announcements",
|
||||
Description: "Announcement management",
|
||||
Commands: []*cli.Command{
|
||||
{
|
||||
Name: "add",
|
||||
Description: "Adds an announcement to the queue.",
|
||||
Action: cmdHost.Announcements().AddAnnouncement,
|
||||
Flags: []cli.Flag{
|
||||
&cli.Int64Flag{
|
||||
Name: "chatid",
|
||||
Aliases: []string{"c"},
|
||||
Usage: "Specifies the chat ID. Required.",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "reminders",
|
||||
Aliases: []string{"r"},
|
||||
Usage: "Enables reminders for this announcement. Reminders will be triggered one week prior and one day prior by default.",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "title",
|
||||
Aliases: []string{"t"},
|
||||
Usage: "Announcement title (optional).",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "content",
|
||||
Aliases: []string{"a"},
|
||||
Usage: "Announcement content (required).",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "weekly",
|
||||
Description: "Lists this week's announcements.",
|
||||
Action: cmdHost.Announcements().ListThisWeeksAnnouncements,
|
||||
},
|
||||
{
|
||||
Name: "today",
|
||||
Description: "Lists the announcements for today.",
|
||||
Action: cmdHost.Announcements().ListTodaysAnnouncements,
|
||||
Flags: []cli.Flag{
|
||||
&cli.Int64Flag{
|
||||
Name: "chatid",
|
||||
Aliases: []string{"c"},
|
||||
Usage: "Specifies the chat ID. Required.",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "birthdays",
|
||||
Description: "Birthday management",
|
||||
|
|
|
|||
Loading…
Reference in a new issue