This commit is contained in:
Łukasz Horonziak 2020-05-24 08:34:29 +02:00
parent 57c962912e
commit de7803becd
3 changed files with 6 additions and 1 deletions

View file

@ -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 {

View file

@ -1139,5 +1139,5 @@ const (
IntentsAll = IntentsAllWithoutPrivileged |
IntentsGuildMembers |
IntentsGuildPresences
IntentsNone Intent = 0
IntentsNone Intent = 0
)

View file

@ -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
}