-
Notifications
You must be signed in to change notification settings - Fork 0
/
slash.go
52 lines (49 loc) · 1.39 KB
/
slash.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
48
49
50
51
52
package main
import "github.com/bwmarrin/discordgo"
var commands = []*discordgo.ApplicationCommand{
{
Name: "subscribe",
Description: "Subscribe to voting alerts",
Options: []*discordgo.ApplicationCommandOption{
{
Type: discordgo.ApplicationCommandOptionString,
Name: "address",
Description: "The Ethereum address or ENS name to receive voting alerts for",
Required: false,
},
{
Type: discordgo.ApplicationCommandOptionBoolean,
Name: "dm-alerts",
Description: "Receive voting alerts via DM",
Required: false,
},
},
},
{
Name: "add-address",
Description: "Add an address to receive voting alerts for",
Options: []*discordgo.ApplicationCommandOption{
{
Type: discordgo.ApplicationCommandOptionString,
Name: "address",
Description: "The Ethereum address or ENS name to receive voting alerts for",
Required: true,
},
},
},
{
Name: "unsubscribe",
Description: "Unsubscribe from all voting alerts",
},
}
var commandHandlers = map[string]func(s *discordgo.Session, i *discordgo.InteractionCreate){
"subscribe": func(s *discordgo.Session, i *discordgo.InteractionCreate) {
return
},
"add-address": func(s *discordgo.Session, i *discordgo.InteractionCreate) {
return
},
"unsubscribe": func(s *discordgo.Session, i *discordgo.InteractionCreate) {
return
},
}