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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(StartThreadOptions): default autoArchiveDuration to channel's defaultAutoArchiveDuration #6278

Merged
merged 2 commits into from Oct 27, 2021

Conversation

ImRodry
Copy link
Contributor

@ImRodry ImRodry commented Aug 2, 2021

Please describe the changes this PR makes and why it should be merged:
This PR marks a thread's autoArchiveDuration parameter as optional when creating one, and defaults it to the channel's defaultAutoArchiveDuration when present. Otherwise, the Discord API will default it to 24 hours as seen in the upstream PR linked below

馃寠 Upstream PR:

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

@iCrawl iCrawl added this to the Version 13 milestone Aug 2, 2021
Copy link
Member

@kyranet kyranet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, waiting for upstream PR to be landed first.

@ImRodry
Copy link
Contributor Author

ImRodry commented Aug 4, 2021

Made this.channel.defaultArchiveDuration the default for autoArchiveDuration due to the conversation on the upstream PR where we found that Discord always defaults to 24h no matter what this is set to and passing null is ignored so it will replicate the default behavior of the API

@iCrawl
Copy link
Member

iCrawl commented Aug 5, 2021

I'm honestly not sure what to do with this PR in its current state and what seems to me like a Discord API bug.

@ImRodry
Copy link
Contributor Author

ImRodry commented Aug 5, 2021

I'm honestly not sure what to do with this PR in its current state and what seems to me like a Discord API bug.

I think we should wait to see what the dapi maintainers say about the other PR and if the bug gets fixed. If it does I can revert the last commit

@ImRodry ImRodry marked this pull request as draft August 5, 2021 15:46
@iCrawl iCrawl removed this from the Version 13 milestone Aug 6, 2021
@ImRodry ImRodry force-pushed the refactor-autoArchiveDuration branch from aafd583 to 394c0f3 Compare August 7, 2021 08:15
@ImRodry ImRodry force-pushed the refactor-autoArchiveDuration branch from 394c0f3 to 5f801af Compare August 16, 2021 09:58
@ImRodry ImRodry force-pushed the refactor-autoArchiveDuration branch from 6024881 to 672032b Compare August 27, 2021 17:28
@ImRodry ImRodry force-pushed the refactor-autoArchiveDuration branch from 672032b to 8419783 Compare October 10, 2021 15:24
@ImRodry ImRodry marked this pull request as ready for review October 14, 2021 16:49
@ImRodry
Copy link
Contributor Author

ImRodry commented Oct 14, 2021

Upstream PR has been merged

@ImRodry ImRodry changed the title types(StartThreadOptions): mark autoArchiveDuration as optional feat(StartThreadOptions): default autoArchiveDuration to channel's defaultAutoArchiveDuration Oct 17, 2021
@iCrawl iCrawl merged commit 740d3f0 into discordjs:main Oct 27, 2021
@ImRodry ImRodry deleted the refactor-autoArchiveDuration branch October 27, 2021 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants