Skip to content

Commit 44dfd8e

Browse files
committed
fix test example
1 parent d0d82ce commit 44dfd8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_examples/test/listeners.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func componentListener(event *events.ComponentInteractionCreate) {
4848
ids := strings.Split(data.CustomID(), ":")
4949
switch ids[0] {
5050
case "modal":
51-
_ = event.CreateModal(discord.ModalCreate{
51+
_ = event.Modal(discord.ModalCreate{
5252
CustomID: "test" + ids[1],
5353
Title: "Test" + ids[1] + " Modal",
5454
Components: []discord.ContainerComponent{
@@ -159,7 +159,7 @@ func applicationCommandListener(event *events.ApplicationCommandInteractionCreat
159159
func autocompleteListener(event *events.AutocompleteInteractionCreate) {
160160
switch event.Data.CommandName {
161161
case "test2":
162-
if err := event.Result([]discord.AutocompleteChoice{
162+
if err := event.AutocompleteResult([]discord.AutocompleteChoice{
163163
discord.AutocompleteChoiceInt{
164164
Name: "test1",
165165
Value: 1,

0 commit comments

Comments
 (0)