~witcher/discord_covid19

c69a4037880a0744e3d65f739f6715f6e846d5a3 — Witcher01 3 years ago 0a26c7b
added aliases
1 files changed, 9 insertions(+), 4 deletions(-)

M discord.go
M discord.go => discord.go +9 -4
@@ 46,6 46,7 @@ func InitDiscordBot(s *discordgo.Session) {

	router.RegisterCmd(&dgc.Command{
		Name:        "addDistricts",
		Aliases:     []string{"add"},
		Description: "adds one or more districts to the tracked districts",
		Usage:       "addDistricts districtId/name",
		Example:     "addDistricts 05113 wolfsburg",


@@ 55,6 56,7 @@ func InitDiscordBot(s *discordgo.Session) {

	router.RegisterCmd(&dgc.Command{
		Name:        "removeDistricts",
		Aliases:     []string{"remove"},
		Description: "remove one or more district from the tracked districts",
		Usage:       "removeDistricts districtId/name",
		Example:     "removeDistricts 05113 wolfsburg",


@@ 64,6 66,7 @@ func InitDiscordBot(s *discordgo.Session) {

	router.RegisterCmd(&dgc.Command{
		Name:        "trackedDistricts",
		Aliases:     []string{"tracked"},
		Description: "show tracked districts",
		Usage:       "trackedDistricts",
		Example:     "trackedDistricts",


@@ 73,6 76,7 @@ func InitDiscordBot(s *discordgo.Session) {

	router.RegisterCmd(&dgc.Command{
		Name:        "trackedIncidences",
		Aliases:     []string{"incidences", "incs"},
		Description: "print the weekly incidences of all tracked districts",
		Usage:       "trackedIncidences",
		Example:     "trackedIncidences",


@@ 82,6 86,7 @@ func InitDiscordBot(s *discordgo.Session) {

	router.RegisterCmd(&dgc.Command{
		Name:        "showDistrict",
		Aliases:     []string{"show"},
		Description: "get information about a district",
		Usage:       "showDistrict districtId/name",
		Example:     "showDistrict essen",


@@ 124,8 129,8 @@ func addDistricts(ctx *dgc.Ctx) {
	log.Infof("Added the following districts to trackedDistricts: %v", names)

	embed := discordgo.MessageEmbed{
		Title: "Added districts",
		Timestamp: time.Now().Format(time.RFC3339),
		Title:       "Added districts",
		Timestamp:   time.Now().Format(time.RFC3339),
		Description: strings.Join(names, ", "),
	}



@@ 158,8 163,8 @@ func removeDistricts(ctx *dgc.Ctx) {
	}

	embed := discordgo.MessageEmbed{
		Title: "Removed districts",
		Timestamp: time.Now().Format(time.RFC3339),
		Title:       "Removed districts",
		Timestamp:   time.Now().Format(time.RFC3339),
		Description: strings.Join(names, ", "),
	}