Skip to content

Commit

Permalink
fix 404 for webhook interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Mar 26, 2022
1 parent b41205d commit 327bcac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _examples/application_commands/http/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func main() {

defer client.Close(context.TODO())

if _, err = client.Rest().ApplicationService().SetGuildCommands(client.ApplicationID(), guildID, commands); err != nil {
if _, err = client.Rest().Applications().SetGuildCommands(client.ApplicationID(), guildID, commands); err != nil {
log.Fatal("error while registering commands: ", err)
}

Expand Down
5 changes: 3 additions & 2 deletions httpserver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
)

func DefaultConfig() *Config {
mux := http.NewServeMux()
return &Config{
URL: "/interactions/callback",
Address: ":80",
HTTPServer: &http.Server{},
ServeMux: http.NewServeMux(),
HTTPServer: &http.Server{Handler: mux},
ServeMux: mux,
}
}

Expand Down

0 comments on commit 327bcac

Please sign in to comment.