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 parsing error for AutoModResponse #2728

Merged
merged 3 commits into from
Sep 21, 2024

Conversation

StasiumDev
Copy link
Contributor

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: NaN

Description

Issue

While rewriting a bot from Discord.js to Discord JDA, it was discovered that AutoModResponseImpl always returns 0 and null for customMessage, timeoutDuration and channel, respectively, despite these values being set.

Cause

Upon investigation, it was found that these values are being accessed incorrectly. They are actually nested within a sub-object called metadata.

Solution

This pull request addresses the issue by correctly accessing the custom_message, duration_seconds and channel_id values from the metadata object in AutoModResponseImpl.

Changes

  • Updated AutoModResponseImpl to access custom_message, duration_seconds and channel_id from the metadata object.
  • Ensured that the correct values are now being returned when these properties are accessed.

Please review and let me know if any further changes or information are needed.

@MinnDevelopment MinnDevelopment changed the title fix: AutoModResponseImpl now accesses the correct object Fix parsing error for AutoModResponse Sep 21, 2024
@MinnDevelopment MinnDevelopment merged commit a7224c4 into discord-jda:master Sep 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants