Skip to content

Conversation

Stasium
Copy link
Contributor

@Stasium Stasium commented Sep 12, 2024

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