forked from jshiffer/matterbridge
parent
a3deb48726
commit
356ada872c
@ -81,17 +81,6 @@ func (b *Bdiscord) Connect() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
b.Log.Info("Connection succeeded")
|
b.Log.Info("Connection succeeded")
|
||||||
b.c.AddHandler(b.messageCreate)
|
|
||||||
b.c.AddHandler(b.messageTyping)
|
|
||||||
b.c.AddHandler(b.messageUpdate)
|
|
||||||
b.c.AddHandler(b.messageDelete)
|
|
||||||
b.c.AddHandler(b.messageDeleteBulk)
|
|
||||||
b.c.AddHandler(b.memberAdd)
|
|
||||||
b.c.AddHandler(b.memberRemove)
|
|
||||||
b.c.AddHandler(b.memberUpdate)
|
|
||||||
if b.GetInt("debuglevel") == 1 {
|
|
||||||
b.c.AddHandler(b.messageEvent)
|
|
||||||
}
|
|
||||||
// Add privileged intent for guild member tracking. This is needed to track nicks
|
// Add privileged intent for guild member tracking. This is needed to track nicks
|
||||||
// for display names and @mention translation
|
// for display names and @mention translation
|
||||||
b.c.Identify.Intents = discordgo.MakeIntent(discordgo.IntentsAllWithoutPrivileged |
|
b.c.Identify.Intents = discordgo.MakeIntent(discordgo.IntentsAllWithoutPrivileged |
|
||||||
@ -233,6 +222,19 @@ func (b *Bdiscord) Connect() error {
|
|||||||
b.nickMemberMap[member.Nick] = member
|
b.nickMemberMap[member.Nick] = member
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
b.c.AddHandler(b.messageCreate)
|
||||||
|
b.c.AddHandler(b.messageTyping)
|
||||||
|
b.c.AddHandler(b.messageUpdate)
|
||||||
|
b.c.AddHandler(b.messageDelete)
|
||||||
|
b.c.AddHandler(b.messageDeleteBulk)
|
||||||
|
b.c.AddHandler(b.memberAdd)
|
||||||
|
b.c.AddHandler(b.memberRemove)
|
||||||
|
b.c.AddHandler(b.memberUpdate)
|
||||||
|
if b.GetInt("debuglevel") == 1 {
|
||||||
|
b.c.AddHandler(b.messageEvent)
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user