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

Changes to Membership Screening API #2547

Merged
merged 3 commits into from
Jan 30, 2021
Merged

Conversation

rickling
Copy link
Contributor

@rickling rickling commented Jan 29, 2021

Hey everyone, a couple of weeks ago we released Membership Screening, a feature that allows servers to require members to agree to rules before they can talk. As part of this, we also introduced new API support & docs (thx @advaith1 ).

This is an announcement that we intend to make significant changes to the API specifically related to getting and editing Membership Screening and the Membership Screening object. Long story short, the current API design isn't great and can be improved. As such, we're undocumenting the current documentation until we finalize the new API and roll it out.

We ARE NOT making changes to pending members and how that ties into GuildMemberAdd and GuildMemberUpdated. You can continue to use pending=false to add roles or w/e after someone passes the screening.

Hopefully, this doesn't impact too many of you. Thanks for building cool stuff.

Edit cuz as correctly pointed out it should be pending=false.

@advaith1
Copy link
Member

should probably remove the routes at the bottom of the file too

also looks like your table formatting setting is different from Mason's (has spaces around the pipes in the divider line, which was the old formatting)

@rickling
Copy link
Contributor Author

should probably remove the routes at the bottom of the file too

also looks like your table formatting setting is different from Mason's (has spaces around the pipes in the divider line, which was the old formatting)

woops good catch, I'll fix those.

@A5rocks
Copy link
Contributor

A5rocks commented Jan 29, 2021

I assume #2530 will be fixed in the next iteration of the API design?

@Skillz4Killz
Copy link
Contributor

We ARE NOT making changes to pending members and how that ties into GuildMemberAdd and GuildMemberUpdated. You can continue to use pending=true to add roles or w/e after someone passes the screening.

I'd like to request that changes SHOULD be made to this as well. pending is one of if not the most confusing things to use in the entire discord API right now. The current implementation is also hard on devs as it essentially requires us to cache every single member just to know when a member has passed the screening.

This is the second time a Discord staffer(not blaming, just as evidence to how confusing this is) has made an inaccurate statement about how pending works. pending=true would not be used add roles that would mean the user is still pending.

Let's make this simpler please 🙏 Thank You!

@SoundWavez97

This comment has been minimized.

@A5rocks
Copy link
Contributor

A5rocks commented Jan 29, 2021

Hey I was wondering if u can add like an anti alt feature or something so we can easily prevent alts and ban evasion

I believe the scope was specified at the top. This is not in said scope...

Idk how but like ik people use vpn to bypass the ipban but if u can make an alt detector which scans every members ip every 5hours or some

They can stay on their VPN

if 2 people in a server has a same ip they get auto banned but it ignores admins and owners.

So I should get banned for visiting the same residential area as someone else that's in the server (NATs are a thing)? No thanks.

(Just writing this so that you know why you're being downvoted...)

PS https://support.discord.com/hc/en-us/community/topics

@MinnDevelopment
Copy link
Contributor

MinnDevelopment commented Jan 29, 2021

So, from what I understand the problem of join roles persists. You still need to cache the members with pending=true until either a member remove or member update happens because you otherwise have no way to tell that they pass screening? This is very unfortunate.

Edit: This is not only a problem for adding roles on joins, this is generally the problem of losing a way to tell that a member joined for any use-case unless caching the state of pending members. There are a multitude of possible ways to use join events for other purposes, such as welcome DMs, captcha bots, and other similar features.

@advaith1
Copy link
Member

advaith1 commented Jan 29, 2021

I don't see why you'd need to cache for join roles (in most cases), just check if (!member.pending && !member.roles.includes('roleid')

@rickling
Copy link
Contributor Author

We ARE NOT making changes to pending members and how that ties into GuildMemberAdd and GuildMemberUpdated. You can continue to use pending=true to add roles or w/e after someone passes the screening.

I'd like to request that changes SHOULD be made to this as well. pending is one of if not the most confusing things to use in the entire discord API right now. The current implementation is also hard on devs as it essentially requires us to cache every single member just to know when a member has passed the screening.

This is the second time a Discord staffer(not blaming, just as evidence to how confusing this is) has made an inaccurate statement about how pending works. pending=true would not be used add roles that would mean the user is still pending.

Let's make this simpler please 🙏 Thank You!

Discussing... stay tuned.

@GolfingSuccess
Copy link

I don't see why you'd need to cache for join roles (in most cases), just check if (!member.pending && !member.roles.includes('roleid')

Because what if I want to unverify a member for whatever reason?

| nick? | ?string | this users guild nickname |
| roles | array of snowflakes | array of [role](#DOCS_TOPICS_PERMISSIONS/role-object) object ids |
| joined_at | ISO8601 timestamp | when the user joined the guild |
| premium_since | ?ISO8601 timestamp | when the user started [boosting](https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-) the guild |
Copy link
Contributor

Choose a reason for hiding this comment

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

was removing the optional marker from premium_since intentional here?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't take too long to get guild member update events without premiums_since though 😕

@rickling rickling merged commit 8aeba1b into master Jan 30, 2021
@rickling rickling deleted the changes/membership-screening branch January 30, 2021 00:09
@erkinalp
Copy link

A better design could use an event such as SCREENING_PASSED to prevent the pending member caching requirement on the bot side.

Copy link

@SamTheone1 SamTheone1 left a comment

Choose a reason for hiding this comment

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

removed comment

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

10 participants