From 242a4e9588473ee52d4b2527e786bb0b0bdf6457 Mon Sep 17 00:00:00 2001 From: appleboy Date: Sun, 24 Sep 2023 19:48:11 +0800 Subject: [PATCH] chore: discordapp.com is deprecated fix https://github.com/appleboy/drone-discord/issues/41 ref: https://github.com/discordjs/discord.js/pull/4160 Signed-off-by: appleboy --- README.md | 2 -- plugin.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 2ea9148..04a2556 100644 --- a/README.md +++ b/README.md @@ -132,8 +132,6 @@ You can get more [information](DOCS.md) about how to use this plugin in drone. Line two ``` - - ## Testing Test the package with the following command: diff --git a/plugin.go b/plugin.go index 305cabc..b81d43a 100644 --- a/plugin.go +++ b/plugin.go @@ -220,7 +220,7 @@ func (p *Plugin) Exec() error { // SendFile upload file to discord func (p *Plugin) SendFile(file string) error { - webhookURL := fmt.Sprintf("https://discordapp.com/api/webhooks/%s/%s", p.Config.WebhookID, p.Config.WebhookToken) + webhookURL := fmt.Sprintf("https://discord.com/api/webhooks/%s/%s", p.Config.WebhookID, p.Config.WebhookToken) extraParams := map[string]string{} if p.Payload.Username != "" {