-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdef.go
More file actions
41 lines (35 loc) · 811 Bytes
/
def.go
File metadata and controls
41 lines (35 loc) · 811 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
38
39
40
41
package main
import (
"time"
)
const (
maxAttempts = 50
throttlePerUser = time.Hour * 24
throttleGlobal = time.Minute * 15
maxPerUser = 3
maxGlobal = 14
maxCombinedResponses = 3
rebootTime = time.Hour * 24 * 7
)
var (
/* Discord data */
discToken string
staffRole string
guildID string
staffChannel string
lastReply time.Time
users map[string]*userData = map[string]*userData{}
discordConnectAttempts int
totalMsgCount int
)
type helpData struct {
Wildcards []string `json:",omitempty"`
Words []string `json:",omitempty"`
Exclude []string `json:",omitempty"`
ReplyLines []string `json:",omitempty"`
}
type userData struct {
id string
lastSaw time.Time
total int
}