-
Notifications
You must be signed in to change notification settings - Fork 3
/
help.go
36 lines (34 loc) · 1.2 KB
/
help.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
package main
import "github.com/bwmarrin/discordgo"
// Help users when they mention the bot
func Help(s *discordgo.Session, h *discordgo.MessageCreate) {
for _, user := range h.Mentions {
if user.ID == s.State.User.ID {
s.ChannelMessageSendEmbed(h.ChannelID, &discordgo.MessageEmbed{
Title: "ℹ️ Help",
Description: "⚠️ These commands can be within a message, and there can be multiple per messages",
Fields: []*discordgo.MessageEmbedField{
{
Name: "![Object] or ![Object.property] or ![package/Object] or ![package/Object.property]",
Value: "Gives a direct link to the closest match from the flutter documentation",
},
{
Name: "?[Object] or ?[Object.property] or ?[package/Object] or ?[package/Object.property]",
Value: "Shows the 10 first search results from the flutter documentation",
},
{
Name: "&[package]",
Value: "Shows up to 10 search results about 'package' on Pub",
},
{
Name: "$[package]",
Value: "Links to the closest matching result to 'package' on Pub",
},
},
Footer: &discordgo.MessageEmbedFooter{
Text: "Source: https://github.com/miyoyo/FlutterDoc",
},
})
}
}
}