-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtemplate.go
More file actions
37 lines (32 loc) · 893 Bytes
/
template.go
File metadata and controls
37 lines (32 loc) · 893 Bytes
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
package helpbot
import "github.com/bwmarrin/discordgo"
func createModal(name, description string, withPrivacy bool) *discordgo.InteractionResponse {
embeds := []*discordgo.MessageEmbed{
{
Title: name,
Color: 0x00ff00,
Description: description,
},
}
if withPrivacy {
embeds = append(embeds, &discordgo.MessageEmbed{
Title: ":mega: Data collection and privacy :mega:",
Color: 0xff0000,
Description: `
By using this bot, you consent that your:
- Full name
- Student ID
- Discord ID
may be collected for the purposes of identifying you on this server.
If you wish to delete your data, please contact a teaching assistant.
`,
})
}
return &discordgo.InteractionResponse{
Type: discordgo.InteractionResponseChannelMessageWithSource,
Data: &discordgo.InteractionResponseData{
Embeds: embeds,
Flags: discordgo.MessageFlagsEphemeral,
},
}
}