Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dustinspecker/discord-notify-ip-change
https://github.com/dustinspecker/discord-notify-ip-change
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dustinspecker/discord-notify-ip-change
- Owner: dustinspecker
- License: mit
- Created: 2023-03-28T01:15:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-04T23:10:17.000Z (over 1 year ago)
- Last Synced: 2024-06-21T15:47:30.828Z (5 months ago)
- Language: Go
- Size: 27.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# discord-notify-ip-change
> Send a message to a Discord channel notifying Public IP Address changed
## Build
1. `make build`
## Usage
```bash
./.bin/discord-notify-ip-change \
-discord-webhook-url "https://discord.com/webhooks/webhooktoken" \
-ip-url "https://api.ipify.org/?format=json"
```### Arguments
#### Required
- `-discord-webhook-url` Discord Webhook URL to send message to
- `-ip-url` URL to retrieve#### Optional
- `-format` template for rendering message to send to Discord (default: `{"content": "{{ .PublicIP }}"}`)
- `-interval` time to wait between checking if IP has changed (default: `4h`)
- `-timeout` amount of time to wait for response from -ip-url (default: `60s`)## Test
```bash
make test
go install github.com/onsi/ginkgo/v2/ginkgo
make int-test
```## License
MIT