diff --git a/discord.go b/discord.go index 74c7887..1f5f5a0 100644 --- a/discord.go +++ b/discord.go @@ -74,6 +74,7 @@ func New(args ...interface{}) (s *Session, err error) { s.Identify.GuildSubscriptions = true s.Identify.Properties.OS = runtime.GOOS s.Identify.Properties.Browser = "DiscordGo v" + VERSION + s.Identify.Intents = MakeIntent(IntentsAllWithoutPrivileged) // If no arguments are passed return the empty Session interface. if args == nil { diff --git a/structs.go b/structs.go index b706c18..914bd4e 100644 --- a/structs.go +++ b/structs.go @@ -1139,5 +1139,5 @@ const ( IntentsAll = IntentsAllWithoutPrivileged | IntentsGuildMembers | IntentsGuildPresences - IntentsNone Intent = 0 + IntentsNone Intent = 0 ) diff --git a/util.go b/util.go index 02443ca..1dc3f47 100644 --- a/util.go +++ b/util.go @@ -15,3 +15,7 @@ func SnowflakeTimestamp(ID string) (t time.Time, err error) { t = time.Unix(timestamp/1000, 0) return } + +func MakeIntent(intents Intent) *Intent { + return &intents +}