This repository has been archived by the owner on Jul 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 70
/
intents_gen.go
64 lines (56 loc) · 2.17 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
57
58
59
60
61
62
63
64
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"
)
type Intent = gateway.Intent
const (
IntentDirectMessageReactions = gateway.IntentDirectMessageReactions
IntentDirectMessageTyping = gateway.IntentDirectMessageTyping
IntentDirectMessages = gateway.IntentDirectMessages
IntentGuildBans = gateway.IntentGuildBans
IntentGuildEmojisAndStickers = gateway.IntentGuildEmojisAndStickers
IntentGuildIntegrations = gateway.IntentGuildIntegrations
IntentGuildInvites = gateway.IntentGuildInvites
IntentGuildMembers = gateway.IntentGuildMembers
IntentGuildMessageReactions = gateway.IntentGuildMessageReactions
IntentGuildMessageTyping = gateway.IntentGuildMessageTyping
IntentGuildMessages = gateway.IntentGuildMessages
IntentGuildPresences = gateway.IntentGuildPresences
IntentGuildScheduledEvents = gateway.IntentGuildScheduledEvents
IntentGuildVoiceStates = gateway.IntentGuildVoiceStates
IntentGuildWebhooks = gateway.IntentGuildWebhooks
IntentGuilds = gateway.IntentGuilds
)
func AllIntents() Intent {
return AllIntentsExcept()
}
func AllIntentsExcept(exceptions ...Intent) Intent {
IntentsMap := map[Intent]int8{
IntentDirectMessageReactions: 0,
IntentDirectMessageTyping: 0,
IntentDirectMessages: 0,
IntentGuildBans: 0,
IntentGuildEmojisAndStickers: 0,
IntentGuildIntegrations: 0,
IntentGuildInvites: 0,
IntentGuildMembers: 0,
IntentGuildMessageReactions: 0,
IntentGuildMessageTyping: 0,
IntentGuildMessages: 0,
IntentGuildPresences: 0,
IntentGuildScheduledEvents: 0,
IntentGuildVoiceStates: 0,
IntentGuildWebhooks: 0,
IntentGuilds: 0,
}
for i := range exceptions {
delete(IntentsMap, exceptions[i])
}
var intents gateway.Intent
for intent := range IntentsMap {
intents |= intent
}
return intents
}