mirror of
https://github.com/MedzikUser/go-screenshot
synced 2024-08-15 03:15:46 +00:00
Added PROXY DOMAIN
This commit is contained in:
parent
2fb1614c26
commit
cd6d40b8e4
1 changed files with 9 additions and 2 deletions
11
main.go
11
main.go
|
@ -28,13 +28,20 @@ func main() {
|
|||
|
||||
webhook := os.Getenv("DISCORD_WEBHOOK_URL")
|
||||
|
||||
domain := os.Getenv("PROXY_DOMAIN")
|
||||
if domain == "" {
|
||||
domain = "https://i.imgur.com"
|
||||
}
|
||||
|
||||
url := domain + "/" + i.Data.IDExt
|
||||
|
||||
err := discordwebhook.SendMessage(webhook, discordwebhook.Message{
|
||||
Embeds: &[]discordwebhook.Embed{
|
||||
{
|
||||
Title: &i.Data.Link,
|
||||
Title: &url,
|
||||
Color: &color,
|
||||
Image: &discordwebhook.Image{
|
||||
Url: &i.Data.Link,
|
||||
Url: &url,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue