Skip to content

Commit

Permalink
Update router.go
Browse files Browse the repository at this point in the history
  • Loading branch information
zackartz authored Sep 14, 2022
1 parent 8908999 commit 0a82d6c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions router.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,15 @@ func (r *Router) Handler() disgord.HandlerInteractionCreate {
if h.Data.Options != nil {
subCmd := checkForSubCommand(cmd, h.Data.Options)

subCmd.Handler(&SubCommandCtx{
Client: r.Client,
Session: &s,
Interaction: h,
Command: subCmd,
Router: r,
})
if subCmd != nil {
subCmd.Handler(&SubCommandCtx{
Client: r.Client,
Session: &s,
Interaction: h,
Command: subCmd,
Router: r,
})
}
return
}

Expand Down

0 comments on commit 0a82d6c

Please sign in to comment.