mirror of
https://github.com/idanoo/NZCovidBot
synced 2025-07-02 11:42:15 +00:00
Use discord embeds
This commit is contained in:
parent
3fc389f1d6
commit
df3c0b9ed4
2 changed files with 11 additions and 20 deletions
|
@ -22,25 +22,14 @@ func postToDiscord(webhookString string, msg string) {
|
|||
return
|
||||
}
|
||||
|
||||
// message, err := webhook.SendContent(msg)
|
||||
// if err != nil {
|
||||
// log.Print(err)
|
||||
// return
|
||||
// }
|
||||
|
||||
// // message, err = webhook.SendEmbeds(api.NewEmbedBuilder().
|
||||
// // SetDescription(msg).
|
||||
// // Build(),
|
||||
// // )
|
||||
// if err != nil {
|
||||
// log.Print(err)
|
||||
// return
|
||||
// }
|
||||
|
||||
_, err = webhook.SendMessage(api.NewWebhookMessageCreateBuilder().
|
||||
SetContent(msg).
|
||||
_, err = webhook.SendEmbeds(api.NewEmbedBuilder().
|
||||
SetDescription(msg).
|
||||
Build(),
|
||||
)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue