forked from andersfylling/disgord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintents_gen.go
56 lines (50 loc) · 1.98 KB
/
intents_gen.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
53
54
55
56
package disgord
// Code generated - This file has been automatically generated by generate/intents/main.go - DO NOT EDIT.
// Warning: This file is overwritten at "go generate", instead adapt internal/gateway/intents.go and run go generate
import (
"github.com/andersfylling/disgord/internal/gateway"
)
const (
IntentDirectMessageReactions = gateway.IntentDirectMessageReactions
IntentDirectMessageTyping = gateway.IntentDirectMessageTyping
IntentDirectMessages = gateway.IntentDirectMessages
IntentGuildBans = gateway.IntentGuildBans
IntentGuildEmojis = gateway.IntentGuildEmojis
IntentGuildIntegrations = gateway.IntentGuildIntegrations
IntentGuildInvites = gateway.IntentGuildInvites
IntentGuildMembers = gateway.IntentGuildMembers
IntentGuildMessageReactions = gateway.IntentGuildMessageReactions
IntentGuildMessageTyping = gateway.IntentGuildMessageTyping
IntentGuildMessages = gateway.IntentGuildMessages
IntentGuildPresences = gateway.IntentGuildPresences
IntentGuildVoiceStates = gateway.IntentGuildVoiceStates
IntentGuildWebhooks = gateway.IntentGuildWebhooks
IntentGuilds = gateway.IntentGuilds
)
func AllIntents(except ...gateway.Intent) gateway.Intent {
IntentsMap := map[gateway.Intent]int8{
IntentDirectMessageReactions: 0,
IntentDirectMessageTyping: 0,
IntentDirectMessages: 0,
IntentGuildBans: 0,
IntentGuildEmojis: 0,
IntentGuildIntegrations: 0,
IntentGuildInvites: 0,
IntentGuildMembers: 0,
IntentGuildMessageReactions: 0,
IntentGuildMessageTyping: 0,
IntentGuildMessages: 0,
IntentGuildPresences: 0,
IntentGuildVoiceStates: 0,
IntentGuildWebhooks: 0,
IntentGuilds: 0,
}
for i := range except {
delete(IntentsMap, except[i])
}
var intents gateway.Intent
for intent := range IntentsMap {
intents |= intent
}
return intents
}