-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
probably fix discord unmarshalling mess
- Loading branch information
plouis.pery
committed
Apr 30, 2024
1 parent
e41cb86
commit ace7ba9
Showing
13 changed files
with
68 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
package corde | ||
|
||
import "context" | ||
|
||
// ButtonComponent mounts a button route on the mux | ||
func (m *Mux) ButtonComponent(route string, handler func(ResponseWriter, *Request[ButtonInteractionData])) { | ||
func (m *Mux) ButtonComponent(route string, handler func(context.Context, ResponseWriter, *Interaction[ButtonInteractionData])) { | ||
m.Mount(ButtonInteraction, route, handler) | ||
} | ||
|
||
// Autocomplete mounts an autocomplete route on the mux | ||
func (m *Mux) Autocomplete(route string, handler func(ResponseWriter, *Request[AutocompleteInteractionData])) { | ||
func (m *Mux) Autocomplete(route string, handler func(context.Context, ResponseWriter, *Interaction[AutocompleteInteractionData])) { | ||
m.Mount(AutocompleteInteraction, route, handler) | ||
} | ||
|
||
// SlashCommand mounts a slash command route on the mux | ||
func (m *Mux) SlashCommand(route string, handler func(ResponseWriter, *Request[SlashCommandInteractionData])) { | ||
func (m *Mux) SlashCommand(route string, handler func(context.Context, ResponseWriter, *Interaction[SlashCommandInteractionData])) { | ||
m.Mount(SlashCommandInteraction, route, handler) | ||
} | ||
|
||
// UserCommand mounts a user command on the mux | ||
func (m *Mux) UserCommand(route string, handler func(ResponseWriter, *Request[UserCommandInteractionData])) { | ||
func (m *Mux) UserCommand(route string, handler func(context.Context, ResponseWriter, *Interaction[UserCommandInteractionData])) { | ||
m.Mount(UserCommandInteraction, route, handler) | ||
} | ||
|
||
// MessageCommand mounts a message command on the mux | ||
func (m *Mux) MessageCommand(route string, handler func(ResponseWriter, *Request[MessageCommandInteractionData])) { | ||
func (m *Mux) MessageCommand(route string, handler func(context.Context, ResponseWriter, *Interaction[MessageCommandInteractionData])) { | ||
m.Mount(MessageCommandInteraction, route, handler) | ||
} | ||
|
||
// Modal mounts a modal interaction response on the mux | ||
func (m *Mux) Modal(route string, handler func(ResponseWriter, *Request[ModalInteractionData])) { | ||
func (m *Mux) Modal(route string, handler func(context.Context, ResponseWriter, *Interaction[ModalInteractionData])) { | ||
m.Mount(ModalInteraction, route, handler) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.