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

Incorrect 400 message from /guilds/{guild.id}/incident-actions #6797

Open
Noxillio opened this issue Apr 14, 2024 · 0 comments
Open

Incorrect 400 message from /guilds/{guild.id}/incident-actions #6797

Noxillio opened this issue Apr 14, 2024 · 0 comments
Labels
bug synced Synced to internal tracker

Comments

@Noxillio
Copy link
Contributor

Description

When specifying a timestamp for dms_disabled_until further in the future than 24 hours (+ 1 minute for whatever reason), the API delivers a 400 response but reads DMs disabled until time cannot exceed 12 hours into the future.

The accurate count is (as mentioned before) 24 hours 1 minute in the future, but could probably get away with changing the message to reflect 24 hours. Not sure why that minute's there, it's probably something I'm just not familiar with yet as I'm new to undocumented stuff, but it's there.

This problem does not affect invites_disabled_until, the message for that one reflects 24 hours and that is accurate. Though the extra minute exists there too, again that's just probably something widely known that I'm not familiar with yet.

Steps to Reproduce

  1. Execute curl -XPUT -H "Content-type: application/json" -d '{"dms_disabled_until":"2025-01-01T00:00:00.000Z"}' 'https://discord.com/api/guilds/{guild.id}/incident-actions' and ensure to include an authorization header for a user which has sufficient permissions for the guild. You can use any timestamp further than 24 hours into the future but I'm fairly certain 2025 should cover that.
  2. Change the timestamp to something further than 12 hours (but less than 24 hours) into the future, then run the command again.

Expected Behavior

  1. The request should fail and give a correct message indicating 24 hours rather than 12 (i.e. DMs disabled until time cannot exceed 24 hours into the future).
  2. No problems.

Current Behavior

  1. The request fails and gives the message described indicating the incorrect time frame of 12 hours rather than 24 (DMs disabled until time cannot exceed 12 hours into the future).
  2. The request will succeed despite the timestamp being more than 12 hours in the future and contradicting the message given.

Screenshots/Videos

No response

Client and System Information

Postman for Windows
Version 10.24.16
Architecture x64
Platform win32 10.0.22631

@Noxillio Noxillio added the bug label Apr 14, 2024
@lmle lmle added the synced Synced to internal tracker label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug synced Synced to internal tracker
Projects
None yet
Development

No branches or pull requests

2 participants