TimothyYe / godns

A dynamic DNS client tool that supports AliDNS, Cloudflare, Google Domains, DNSPod, HE.net & DuckDNS & DreamHost, etc, written in Go.
https://timothyye.github.io/godns/
Apache License 2.0
1.5k stars 221 forks source link

feat: Add support for discord notifications #110

Closed Kirbstomper closed 3 years ago

Kirbstomper commented 3 years ago

Added support for discord notifications. Unlike telegram and slack, discord seems to require creating a websocket connection before allowing messages to be sent using its API. To help facilitate this I used the discordgo library.

A connection is created and closed each time a message is sent, so there might be room for some improvement there?.

TimothyYe commented 3 years ago

A connection is created and closed each time a message is sent, so there might be room for some improvement there?

And for now, the notification message is only sent when IP is changed, not so frequently. So far, I think it's ok to create and close the connection each time.

TimothyYe commented 3 years ago

Thanks for your contribution!