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

feat(GuildMember): add method to check timeout #7146

Merged
merged 5 commits into from Dec 29, 2021

Conversation

iShibi
Copy link
Contributor

@iShibi iShibi commented Dec 25, 2021

Please describe the changes this PR makes and why it should be merged:

closes: #7145

Status and versioning classification:

  • Code changes have been tested against the Discord API
  • I know how to update typings and have done so
  • This PR changes the library's interface (methods or parameters added)

src/structures/GuildMember.js Outdated Show resolved Hide resolved
src/structures/GuildMember.js Outdated Show resolved Hide resolved
@advaith1
Copy link
Contributor

why is it not a getter?

@Jiralite
Copy link
Member

Getters cannot help narrow types:

discord.js/typings/index.d.ts

Lines 1126 to 1129 in 4e76012

public isTimedOut(): this is GuildMember & {
communicationDisabledUntilTimestamp: number;
communicationDisabledUntil: Date;
};

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
@iShibi iShibi changed the title feat(GuildMember): add isTimedOut method feat(GuildMember): add method to check whether a member is currently timed out Dec 25, 2021
typings/index.d.ts Outdated Show resolved Hide resolved
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
@iCrawl iCrawl changed the title feat(GuildMember): add method to check whether a member is currently timed out feat(GuildMember): add method to check timeout Dec 29, 2021
@iCrawl iCrawl merged commit baacd6b into discordjs:main Dec 29, 2021
@iShibi iShibi deleted the is-timedout branch December 30, 2021 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

isTimeouted or Timeouted
10 participants