Skip to content

Commit

Permalink
removed SampleMessageExample function from webhook.go
Browse files Browse the repository at this point in the history
  • Loading branch information
kanielv committed Nov 17, 2024
1 parent b4bc6a3 commit b3b7cf7
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions server/internal/punishments/discord/webhook/webhook.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package webhook

import (
"log"

"github.com/gtuk/discordwebhook"
)

Expand Down Expand Up @@ -59,35 +57,3 @@ func (d *DiscordWebHook) SendMessage(webhookURL string) error {
return err

}

func SendMessageExample(discord_webhook string) {
var username = "Wake Up"
var content = "Simple Message"

var title = "Testing Embed"
var description = "Embed Description."
var color = "383483" // Must be a numerical value not nex
var url2 = "https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExbXluOXlraTJzNzU1eHhqdnNta2xld3l2anA0bG0zemM1NTBiajIxYyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/qpCvOBBmBkble/giphy.webp"

image := discordwebhook.Image{
Url: &url2,
}

embeds := discordwebhook.Embed{
Title: &title,
Description: &description,
Color: &color,
Image: &image,
}

message := discordwebhook.Message{
Username: &username,
Content: &content,
Embeds: &[]discordwebhook.Embed{embeds},
}

err := discordwebhook.SendMessage(discord_webhook, message)
if err != nil {
log.Fatal(err)
}
}

0 comments on commit b3b7cf7

Please sign in to comment.