Skip to content

Commit

Permalink
fix: variables parsed after middleware runs
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Dec 12, 2024
1 parent fe3e043 commit 99ca7a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handler/mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ func (r *Mux) Match(path string, t discord.InteractionType, t2 int) bool {

// Handle handles the given interaction event.
func (r *Mux) Handle(path string, event *InteractionEvent) error {
handlerChain := Handler(func(event *InteractionEvent) error {
path = parseVariables(path, r.pattern, event.Vars)
path = parseVariables(path, r.pattern, event.Vars)

handlerChain := Handler(func(event *InteractionEvent) error {
t := event.Type()
var t2 int
switch i := event.Interaction.(type) {
Expand Down

0 comments on commit 99ca7a2

Please sign in to comment.