[Bug]: @everyone role does not work for whitelisting #24

Closed
opened 2023-11-15 19:16:29 +00:00 by kaydenvg · 8 comments
kaydenvg commented 2023-11-15 19:16:29 +00:00 (Migrated from github.com)

Version information

1.0.0 Alpha 8

Version type

Full

Expected Behavior

users with no role/@everyone are able to use np!register to whitelist themselves

Actual Behavior

"Sorry, but I couldn't accept your request
It seems that you don't have the required subscription/member level or don't have your Twitch/Youtube account linked to your Discord account."

Reproduction Steps

  1. Be a normal @everyone user
  2. Type np!register
  3. response is:
    "Sorry, but I couldn't accept your request
    It seems that you don't have the required subscription/member level or don't have your Twitch/Youtube account linked to your Discord account."

Java version

N/A, issue with bot

Additional information

Whitelisting self works with any role other than the default @everyone. Made a new role with no special permissions/not admin and it works, but I'd prefer if anyone joining the server with the default role could whitelist themselves.

### Version information 1.0.0 Alpha 8 ### Version type Full ### Expected Behavior users with no role/`@everyone` are able to use np!register to whitelist themselves ### Actual Behavior "Sorry, but I couldn't accept your request It seems that you don't have the required subscription/member level or don't have your Twitch/Youtube account linked to your Discord account." ### Reproduction Steps 1. Be a normal `@everyone` user 2. Type np!register <username> 3. response is: "Sorry, but I couldn't accept your request It seems that you don't have the required subscription/member level or don't have your Twitch/Youtube account linked to your Discord account." ### Java version N/A, issue with bot ### Additional information Whitelisting self works with any role other than the default `@everyone`. Made a new role with no special permissions/not admin and it works, but I'd prefer if anyone joining the server with the default role could whitelist themselves.
csm-kb commented 2023-11-30 03:03:22 +00:00 (Migrated from github.com)

yo! I'm w/ @kaydenvg , there's two ways I think could be good for solving this (ref Awakened-Redstone/AutoWhitelist@cf6c29bd0c/src/main/java/com/awakenedredstone/autowhitelist/discord/commands/RegisterCommand.java (L65)):

  1. have the bot recognize when a guild's @everyone role is in the config list
  2. have a new config setting akin to allowEveryone: boolean, and have it bypass the whitelist check if that is true

thoughts? would be a fast PR

yo! I'm w/ @kaydenvg , there's two ways I think could be good for solving this (ref https://github.com/Awakened-Redstone/AutoWhitelist/blob/cf6c29bd0cf289f8a1746ce5202467954c58e8c5/src/main/java/com/awakenedredstone/autowhitelist/discord/commands/RegisterCommand.java#L65): 1. have the bot recognize when a guild's `@everyone` role is in the config list 2. have a new config setting akin to `allowEveryone: boolean`, and have it bypass the whitelist check if that is true thoughts? would be a fast PR
Awakened-Redstone commented 2023-11-30 03:46:10 +00:00 (Migrated from github.com)

Yeah, it shouldn't be complicated. I have been pretty busy recently, so I haven't had time to work on the issue. I'll try working on it this weekend.

Yeah, it shouldn't be complicated. I have been pretty busy recently, so I haven't had time to work on the issue. I'll try working on it this weekend.
csm-kb commented 2023-11-30 16:08:35 +00:00 (Migrated from github.com)

I ask because we'd be happy to make the change and make the PR, given which way you want to take it! 🙇‍♂️

I ask because we'd be happy to make the change and make the PR, given which way you want to take it! 🙇‍♂️
Awakened-Redstone commented 2023-11-30 16:11:25 +00:00 (Migrated from github.com)

You are always free to make a PR

You are always free to make a PR
csm-kb commented 2023-11-30 19:20:47 +00:00 (Migrated from github.com)

Would the config option be the preferred method here?

Would the config option be the preferred method here?
Awakened-Redstone commented 2023-12-01 00:30:29 +00:00 (Migrated from github.com)

I have considered adding a small additional line for processing @everyone (from server id) into a role for the cached list or process something like id -1 into the role, the reason I don't look for the presence of the role or add an option for that is because I want to allow the users to also use roles along @everyone

I want to later work on some QoL for the mod and push it into beta or release when I have more time, feel free to make a PR with a workaround, it can be improved later, the mod is currently on alpha state.

I have considered adding a small additional line for processing `@everyone` (from server id) into a role for the cached list or process something like id -1 into the role, the reason I don't look for the presence of the role or add an option for that is because I want to allow the users to also use roles along `@everyone` I want to later work on some QoL for the mod and push it into beta or release when I have more time, feel free to make a PR with a workaround, it can be improved later, the mod is currently on alpha state.
csm-kb commented 2023-12-01 01:55:04 +00:00 (Migrated from github.com)

Question: given master is the default branch but I note dev/full, which should I make this PR against?
disregard, going to fork and PR a master

  • to this end, you may want to add contribution how-to notes in the readme! 😌
~~Question: given `master` is the default branch but I note `dev/full`, which should I make this PR against?~~ disregard, going to fork and PR a `master` - to this end, you may want to add contribution how-to notes in the readme! 😌
Awakened-Redstone commented 2023-12-09 22:23:14 +00:00 (Migrated from github.com)

Fixed by #27, patch released in 1.0.0-alpha.10

Fixed by #27, patch released in [1.0.0-alpha.10](https://modrinth.com/mod/autowhitelist/version/1.0.0-alpha.10)
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LunaFox/AutoWhitelist#24
No description provided.