make webhook messages magenta

This commit is contained in:
Cynthia Foxwell 2023-07-14 21:15:40 -06:00
parent a9b3accdf6
commit 27ffa6ef14
1 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,7 @@ type MessageOptions struct {
Name string
Channel string
Bot bool
Webhook bool
Attachments []*discordgo.MessageAttachment
Stickers []*discordgo.Sticker
Reply *discordgo.Message
@ -177,6 +178,8 @@ func FormatMessage(session *discordgo.Session, options MessageOptions) {
nameColor := "cyan+b"
if options.IsMention {
nameColor = "red+b"
} else if options.Webhook {
nameColor = "magenta+b"
} else if options.Bot {
nameColor = "yellow+b"
}
@ -293,6 +296,7 @@ func ProcessMessage(session *discordgo.Session, msg *discordgo.Message, options
options.Name = msg.Author.Username
options.Channel = msg.ChannelID
options.Bot = msg.Author.Bot
options.Webhook = msg.WebhookID != ""
options.Attachments = msg.Attachments
options.Stickers = msg.StickerItems
if i == 0 {
@ -311,6 +315,7 @@ func ProcessMessage(session *discordgo.Session, msg *discordgo.Message, options
options.Name = msg.Author.Username
options.Channel = msg.ChannelID
options.Bot = msg.Author.Bot
options.Webhook = msg.WebhookID != ""
options.Attachments = msg.Attachments
options.Stickers = msg.StickerItems
options.Reply = msg.ReferencedMessage