Skip to content

Commit

Permalink
[messages] add simNumber flag alias
Browse files Browse the repository at this point in the history
  • Loading branch information
capcom6 committed Dec 23, 2024
1 parent 845addf commit f5f308f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ smsgate send [options] 'Message content'
| Option | Description | Default value | Example |
| --------------------------- | ------------------------------------------------------------------------------------------ | ------------- | ----------------------- |
| `--id` | Message ID, will be generated if not provided | empty | `zXDYfTmTVf3iMd16zzdBj` |
| `--phone`, `--phones`, `-p` | Phone number, can be used multiple times or with comma-separated values | **required** | `+19162255887` |
| `--sim` | SIM card slot number, if empty, the default SIM card will be used | empty | `2` |
| `--phone`, `--phones`, `-p` | Phone number, can be used multiple times or with comma-separated values, E.164 format | **required** | `+19162255887` |
| `--sim`, `--simNumber` | One-based SIM card slot number, if empty, the default SIM card will be used | empty | `2` |
| `--ttl` | Time-to-live (TTL), if empty, the message will not expire<br>Conflicts with `--validUntil` | empty | `1h30m` |
| `--validUntil` | Valid until, if empty, the message will not expire<br>Conflicts with `--ttl` | empty | `2024-12-31T23:59:59Z` |

Expand Down
11 changes: 6 additions & 5 deletions internal/commands/messages/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,22 @@ var send = &cli.Command{
&cli.StringSliceFlag{
Name: "phones",
Aliases: []string{"p", "phone"},
Usage: "Phone numbers",
Usage: "Phone numbers (E.164 format, e.g. +19162255887)",
Required: true,
},
&cli.IntFlag{
Name: "sim",
Usage: "SIM card index (1-3)",
Name: "sim",
Aliases: []string{"simNumber"},
Usage: "SIM card index (one-based index, e.g. 1)",
},
&cli.DurationFlag{
Name: "ttl",
Usage: "Time to live",
Usage: "Time to live (duration, e.g. 1h30m)",
DefaultText: "unlimited",
},
&cli.TimestampFlag{
Name: "validUntil",
Usage: "Valid until",
Usage: "Valid until (RFC3339 format, e.g. 2006-01-02T15:04:05Z07:00)",
Layout: time.RFC3339,
Timezone: time.Local,
},
Expand Down

0 comments on commit f5f308f

Please sign in to comment.