Skip to content

v3: CommandInteraction Doesn't Support Attachment Options #419

@Benbebop

Description

@Benbebop

You cant unmarshal an attachment option on a CommandInteraction.

r.AddFunc("blabla", func(ctx context.Context, data cmdroute.CommandData) *api.InteractionResponseData {
	var options = struct {
		Attachment discord.AttachmentID `discord:"attachment"`
	}{}
	if err := data.Options.Unmarshal(&options); err != nil {
		log.Fatalln(err)
	}
}

option "attachment" expecting type 10, got 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions