Skip to content

Commit

Permalink
reset context response status on pool get [fix #6]
Browse files Browse the repository at this point in the history
  • Loading branch information
zekroTJA committed Oct 13, 2021
1 parent 007d57f commit 0f9166b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
# vendor/

.vscode/
.commandCache.json
.commandCache.json
.env
1 change: 1 addition & 0 deletions ken.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ func (k *Ken) onInteractionCreate(s *discordgo.Session, e *discordgo.Interaction
ctx := k.ctxPool.Get().(*Ctx)
defer k.ctxPool.Put(ctx)
ctx.Purge()
ctx.responded = false
ctx.k = k
ctx.Session = s
ctx.Event = e
Expand Down

0 comments on commit 0f9166b

Please sign in to comment.