Closed EternalllZM closed 2 months ago
It's working for me.
nickname-matches-any only matches for if a user has a nickname
Do you wanna use if-any with both checking nickname and username? https://twentysix26.github.io/defender-docs/warden/overview/#defining-a-more-complex-rule
It may be an issue of needing a displayname-matches-any:
condition. When usernames were changed I believe you were given the option to set a username and a display name. This display name cannot be queried using any existing warden condition. None of my de-hoisting rules work because the ! <name>
is neither their username nor a set server-based nickname.
Example of an account with this username/DN difference here
This is the root condition of the dehoist rule, which should be TRUE
on this profile, yet nothing happens.
if:
- if-any:
- nickname-matches-any: ['!*', "'*", '"*']
- username-matches-any: ['!*', "'*", '"*']
I can't seem to reproduce this issue
When usernames were changed I believe you were given the option to set a username and a display name. This display name cannot be queried using any existing warden condition
I'm not sure what you mean here. To clarify the terminology: "nickname" is the server specific name that you can set in your server profile. In Discord's UI it takes precedence over your global username. "username", or just "name", is your global username. If you don't have a nickname, you show up as that. "display name", in the context of discord.py, means either the server nickname (if one is present) OR the global username.
Now, I'm partial to adding a display-name-matches-any
as I recognize it would be useful to avoid repetition.
FYI this is already kinda doable with compare
and the $user_display
context variable, you'd be missing the convenience of passing a list of possible names though.
Added a check for the global display name in #87, but some combinatory "name-matches-any" which does username, global display name, and server nickname, might be less of a ballache.
It's what most people want, instead of having do do an if-any with three conds
I'm not sure what you mean here. To clarify the terminology: "nickname" is the server specific name that you can set in your server profile. In Discord's UI it takes precedence over your global username. "username", or just "name", is your global username. If you don't have a nickname, you show up as that. "display name", in the context of discord.py, means either the server nickname (if one is present) OR the global username.
There's all three: Username: The replacement for username#discriminator Display Name: A global nickname, shows up instead where available Nickname: Server specific nickname
@EternalllZM Ah I see what you meant with global name now. Ty @DoctorDinosaur. A display-name-matches-any
is definitely needed now.
Fixed title. Apologies for the inadequate description and confusion surrounding the issue. I wasn't familiar with what discord.py called it in their docs.
Tested and verified fixed by 483150f
Cog
Describe the bug Any
nickname-matches-any
condition simply does not return true even if there are examples of nicknames that should return true.To Reproduce Steps to reproduce the behavior:
nickname-matches-any
Expected behavior This condition last worked prior to discord updating usernames, that or Red 3.5, those were around the same time.
username-matches-any
works just fine from my last test.Screenshots N/A