mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-11-30 16:17:57 +00:00
example/undeleter: Fix AddSyncHandler
This commit is contained in:
parent
477695f2e6
commit
accb2fc52b
|
|
@ -26,8 +26,7 @@ func main() {
|
||||||
|
|
||||||
// Make a pre-handler
|
// Make a pre-handler
|
||||||
s.PreHandler = handler.New()
|
s.PreHandler = handler.New()
|
||||||
s.PreHandler.Synchronous = true
|
s.PreHandler.AddSyncHandler(func(c *gateway.MessageDeleteEvent) {
|
||||||
s.PreHandler.AddHandler(func(c *gateway.MessageDeleteEvent) {
|
|
||||||
// Grab from the state
|
// Grab from the state
|
||||||
m, err := s.Message(c.ChannelID, c.ID)
|
m, err := s.Message(c.ChannelID, c.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue