Skip to content

Commit

Permalink
fix test example
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Sep 29, 2023
1 parent d0d82ce commit 44dfd8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _examples/test/listeners.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func componentListener(event *events.ComponentInteractionCreate) {
ids := strings.Split(data.CustomID(), ":")
switch ids[0] {
case "modal":
_ = event.CreateModal(discord.ModalCreate{
_ = event.Modal(discord.ModalCreate{
CustomID: "test" + ids[1],
Title: "Test" + ids[1] + " Modal",
Components: []discord.ContainerComponent{
Expand Down Expand Up @@ -159,7 +159,7 @@ func applicationCommandListener(event *events.ApplicationCommandInteractionCreat
func autocompleteListener(event *events.AutocompleteInteractionCreate) {
switch event.Data.CommandName {
case "test2":
if err := event.Result([]discord.AutocompleteChoice{
if err := event.AutocompleteResult([]discord.AutocompleteChoice{
discord.AutocompleteChoiceInt{
Name: "test1",
Value: 1,
Expand Down

0 comments on commit 44dfd8e

Please sign in to comment.