Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update interaction type to STRING_SELECT_MENU_INTERACTION to resolve DiscordAPIError #169

Merged
merged 3 commits into from
Aug 19, 2024

Conversation

okBenito
Copy link
Contributor

@okBenito okBenito commented Aug 8, 2024

Summary

This pull request updates the interaction type for menu interactions to STRING_SELECT_MENU_INTERACTION to align the Discord API.

Changes Made

  • logs.ts: Updated the interaction exclusion list to use STRING_SELECT_MENU_INTERACTION as well as SELECT_MENU_INTERACTION.
  • Logger.ts: Added STRING_SELECT_MENU_INTERACTION to the list of recognized interaction types.
  • interactions.d.ts: Updated InteractionsConstants to include STRING_SELECT_MENU_INTERACTION.

Reason for Changes

I encountered an issue with menu interactions returning STRING_SELECT_MENU_INTERACTION instead of SELECT_MENU_INTERACTION. This update ensures that the correct interaction type is used.

info [08/08/2024 - 03:46:05] (CHAT_INPUT_COMMAND_INTERACTION) "help" in channel #🤖commands in guild okRick's server by okrick#0
info [08/08/2024 - 03:46:10] (STRING_SELECT_MENU_INTERACTION) "help-category-selector" in channel #🤖commands in guild okRick's server by okrick#0
error [08/08/2024 - 03:46:10] DiscordAPIError[50035]: Invalid Form Body
embeds[0].fields[0].value[BASE_TYPE_REQUIRED]: This field is required

@Mr-Artemus Mr-Artemus changed the base branch from main to version/2.4 August 19, 2024 13:02
@Mr-Artemus Mr-Artemus merged commit 18316e1 into barthofu:version/2.4 Aug 19, 2024
1 check passed
@barthofu barthofu mentioned this pull request Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants