-
Notifications
You must be signed in to change notification settings - Fork 0
/
embed.go
47 lines (36 loc) · 810 Bytes
/
embed.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package discutils
import (
"github.com/bwmarrin/discordgo"
)
var (
COLOR_PRIMARY = 0xad6bee
COLOR_SUCCESS = 0x08dd7e
COLOR_DANGER = 0xA51D2A
)
// A fully empty field that is inline
var EmptyField = &discordgo.MessageEmbedField{
Name: CHAR_ZWS,
Value: CHAR_ZWS,
Inline: true,
}
// A fully empty field that is not inline
var EmptyFieldNotInline = &discordgo.MessageEmbedField{
Name: CHAR_ZWS,
Value: CHAR_ZWS,
Inline: false,
}
var BaseEmbed = discordgo.MessageEmbed{
Title: CHAR_ZWS,
Color: COLOR_PRIMARY,
}
var ErrEmbed func(err string) *discordgo.MessageEmbed
// Generate an embed using the base embed
func GEmbed(title, desc string) *discordgo.MessageEmbed {
emb := BaseEmbed
emb.Title = title
if title == "" {
emb.Title = CHAR_ZWS
}
emb.Description = desc
return &emb
}