Skip to content

Commit

Permalink
Rename message age parameters for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
cedws committed Nov 25, 2021
1 parent 10cf770 commit e777ea6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/partial.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ func partial(cmd *cobra.Command, args []string) {
if err != nil {
log.Fatal(err)
}
log.Infof("Deleting messages with a minimum age of %v days", minAge)
log.Infof("Deleting messages older than %v days", minAge)
}

if maxAge > 0 {
err = client.SetMaxAge(maxAge)
if err != nil {
log.Fatal(err)
}
log.Infof("Deleting messages with a maximum age of %v days", maxAge)
log.Infof("Deleting messages newer than %v days", maxAge)
}

err = client.PartialDelete()
Expand All @@ -72,7 +72,7 @@ func partial(cmd *cobra.Command, args []string) {

func init() {
partialCmd.Flags().BoolVarP(&dryrun, "dry-run", "d", false, "perform dry run without deleting anything")
partialCmd.Flags().UintVarP(&minAge, "min-age-days", "i", 0, "minimum age in days of messages to delete")
partialCmd.Flags().UintVarP(&maxAge, "max-age-days", "a", 0, "maximum age in days of messages to delete")
partialCmd.Flags().UintVarP(&minAge, "older-than-days", "o", 0, "minimum number in days of messages to be deleted")
partialCmd.Flags().UintVarP(&maxAge, "newer-than-days", "n", 0, "maximum number in days of messages to be deleted")
partialCmd.Flags().StringSliceVarP(&skipChannels, "skip", "s", []string{}, "skip message deletion for specified channels/guilds")
}

0 comments on commit e777ea6

Please sign in to comment.