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

refactor: call GuildBanManager#create() directly #9263

Merged
merged 2 commits into from
Apr 1, 2023

Conversation

TetieWasTaken
Copy link
Contributor

Please describe the changes this PR makes and why it should be merged:
Instead of calling GuildBanManager#ban() at GuildMember#ban(), we call GuildBanManager#create() directly. Since GuildMemberManager#ban() simply calls GuildBanManager#create() aswell. Thus skipping a useless redirect.

ban(options) {
return this.guild.members.ban(this, options);
}

ban(user, options) {
return this.guild.bans.create(user, options);
}

async create(user, options = {}) {

Status and versioning classification:

  • I know how to update typings and have done so, or typings don't need updating

@vercel
Copy link

vercel bot commented Mar 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
discord-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 1, 2023 10:06pm
discord-js-guide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 1, 2023 10:06pm

@vercel
Copy link

vercel bot commented Mar 29, 2023

@TetieWasTaken is attempting to deploy a commit to the discordjs Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

github-actions bot commented Mar 29, 2023

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 99
🟢 Accessibility 94
🟢 Best practices 100
🟢 SEO 100
🟠 PWA 70

Lighthouse ran on https://discord-js-git-fork-tetiewastaken-direct-ban-discordjs.vercel.app/

Copy link
Member

@SpaceEEC SpaceEEC left a comment

Choose a reason for hiding this comment

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

🤷

@kodiakhq kodiakhq bot merged commit f340f3b into discordjs:main Apr 1, 2023
4 checks passed
@TetieWasTaken TetieWasTaken deleted the direct-ban branch April 16, 2023 17:51
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.

None yet

6 participants