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: GuildBanManager #5276

Merged
merged 44 commits into from May 10, 2021
Merged

feat: GuildBanManager #5276

merged 44 commits into from May 10, 2021

Conversation

MBR-0001
Copy link
Contributor

@MBR-0001 MBR-0001 commented Jan 31, 2021

Please describe the changes this PR makes and why it should be merged:
This PR adds GuildBanManager to guilds, it replaces guild#fetchBans/guild#fetchBan and adds a ban cache (which is most of the time partial). I decided to add this because actions like fetching guild ban count or checking if a member is banned required sending a request to Discord every single time (or manually handling ban/unban events lol)

I've been using this with my bots for probably 4 months now and didn't have any issues (afaik)
(a lot of comments/docs are copied from other classes lol)

Status and versioning classification:

  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)
  • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • Wouldn't mind testing I guess

Please be gentle, this is my first time

src/managers/GuildBanManager.js Outdated Show resolved Hide resolved
Copy link
Contributor

@NotSugden NotSugden left a comment

Choose a reason for hiding this comment

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

jsdoc also needs correcting

src/client/actions/GuildBanAdd.js Outdated Show resolved Hide resolved
src/structures/GuildBan.js Outdated Show resolved Hide resolved
src/client/actions/GuildBanRemove.js Outdated Show resolved Hide resolved
src/client/actions/GuildBanAdd.js Outdated Show resolved Hide resolved
src/client/actions/GuildBanAdd.js Outdated Show resolved Hide resolved
src/client/actions/GuildBanRemove.js Outdated Show resolved Hide resolved
src/managers/GuildBanManager.js Outdated Show resolved Hide resolved
src/managers/GuildBanManager.js Outdated Show resolved Hide resolved
src/managers/GuildBanManager.js Outdated Show resolved Hide resolved
src/managers/GuildBanManager.js Outdated Show resolved Hide resolved
src/structures/Guild.js Outdated Show resolved Hide resolved
src/structures/GuildBan.js Outdated Show resolved Hide resolved
MBR-0001 and others added 8 commits February 1, 2021 22:50
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
Copy link
Contributor

@NotSugden NotSugden left a comment

Choose a reason for hiding this comment

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

jsdoc strings for the events still need updating

src/client/actions/GuildBanRemove.js Outdated Show resolved Hide resolved
src/client/actions/GuildBanAdd.js Outdated Show resolved Hide resolved
src/client/actions/GuildBanRemove.js Outdated Show resolved Hide resolved
src/managers/GuildBanManager.js Outdated Show resolved Hide resolved
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
typings/index.d.ts Outdated Show resolved Hide resolved
src/structures/GuildBan.js Outdated Show resolved Hide resolved
typings/index.d.ts Outdated Show resolved Hide resolved
typings/index.d.ts Outdated Show resolved Hide resolved
src/structures/GuildBan.js Outdated Show resolved Hide resolved
src/structures/GuildBan.js Outdated Show resolved Hide resolved
src/structures/GuildBan.js Outdated Show resolved Hide resolved
src/structures/GuildBan.js Outdated Show resolved Hide resolved
typings/index.d.ts Outdated Show resolved Hide resolved
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Copy link

@cosmicice0 cosmicice0 left a comment

Choose a reason for hiding this comment

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

Seems good to me

Co-authored-by: Shubham Parihar <shubhamparihar391@gmail.com>
@iShibi
Copy link
Contributor

iShibi commented Mar 27, 2021

Why Guild#fetchBan and Guild#fetchBans were removed instead of keeping them as aliases? nvm, it's okay. Context.

@MBR-0001 MBR-0001 changed the title feat(GuildBanManager): Add GuildBanManager feat: GuildBanManager Mar 28, 2021
MBR-0001 and others added 2 commits March 28, 2021 17:05
Co-authored-by: Shubham Parihar <shubhamparihar391@gmail.com>
@iCrawl iCrawl merged commit 6d09160 into discordjs:master May 10, 2021
@iCrawl iCrawl added this to the Version 13 milestone Jun 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet