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 timeouts #7104

Merged
merged 41 commits into from
Dec 22, 2021
Merged

feat(GuildMember): Add timeouts #7104

merged 41 commits into from
Dec 22, 2021

Conversation

Jiralite
Copy link
Member

@Jiralite Jiralite commented Dec 12, 2021

Description

Checklist

  • Add communication_disabled_until property in the GuildMember class
  • Support modifying communication_disabled_until in GuildMemberManager#edit()
    • Add helper method(s) to GuildMember
  • Add MODERATE_MEMBERS permission
  • Add necessary checks to permission helpers

Classification

  • Code changes have been tested against the Discord API
  • Typings have been updated
  • This pull request changes the library's interface

@Jiralite Jiralite marked this pull request as draft December 12, 2021 18:18
typings/index.d.ts Outdated Show resolved Hide resolved
@lostful

This comment has been minimized.

@ImRodry

This comment has been minimized.

@lostful

This comment has been minimized.

@Glazelf

This comment has been minimized.

src/structures/GuildMember.js Outdated Show resolved Hide resolved
src/structures/BaseGuildVoiceChannel.js Outdated Show resolved Hide resolved
@Jiralite
Copy link
Member Author

I believe that's all permission checks done. Feel free to re-review!

src/structures/ThreadChannel.js Outdated Show resolved Hide resolved
Copy link
Contributor

@ImRodry ImRodry left a comment

Choose a reason for hiding this comment

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

Could GuildMember#moderatable be added?

src/structures/ThreadChannel.js Outdated Show resolved Hide resolved
Copy link

@TheCreativeGod TheCreativeGod left a comment

Choose a reason for hiding this comment

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

See if we can use a single return adding the timeout with specific permissions

src/structures/BaseGuildVoiceChannel.js Outdated Show resolved Hide resolved
src/structures/ThreadChannel.js Outdated Show resolved Hide resolved
src/structures/VoiceChannel.js Outdated Show resolved Hide resolved
@Jiralite
Copy link
Member Author

See if we can use a single return adding the timeout with specific permissions

Sure, but Prettier would want these to be on multiple lines anyway. I'll do it nonetheless.

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.

Add support for GuildMember timeout