[Bug]: Discord user has a requiredRole but cannot join due to not having the requiredRole
RandomGgames opened this issue · 3 comments
What happened?
So under the linking feature, I can make it where only people with a specific role on my discord can join the server. It is not detecting that users have the required role however and is thus completely broken because no one can join.
I have a role called "CanWhitelist". The CanWhitelist ID is put into requiredRoles setting as follows: requiredRoles = [ "1012284235983364138" ]
. I gave myself the CanWhitelist role, linked my account just fine with the code, but than when I try to join it says I do not have the required role. This feature needs to be fixed!
Version: dcintegration-fabric-2.4.5-1.19
Game Version
Other
What platform are you using?
Fabric
Platform version
2.4.5
Config File
[linking]
# Unlink players when they leave the discord server for whatever reason (ex. leave,kick,ban)?
unlinkOnLeave = true
# Should discord linking be enabled?
# If whitelist is on, this can NOT be disabled
# DOES NOT WORK IN OFFLINE MODE!
enableLinking = true
# Role ID of an role an player should get when he links his discord account
# Leave as 0 to disable
linkedRoleID = "0"
# Enable discord based whitelist?
# This will override the link config!
# To whitelist use the whitelist command in the bot DMs
whitelistMode = true
# Adding Role IDs here will require the players to have at least ONE of these roles to link account
requiredRoles = [ "1012284235983364138" ]
settingsBlacklist = [ ]
Crash report / Error log (if applicable)
[00:13:43] [Server thread/INFO]: com.mojang.authlib.GameProfile@6812c64f[id=0bfc9cc9-c15f-49d6-87f4-dfcdc43d9802,name=RandomGgames,properties={texture s=[com.mojang.authlib.properties.Property@651572b1]},legacy=false] (/127.0.0.1:60661) lost connection: §cYou are whitelisted, but you need an role to join.
See the discord server for more information
[00:13:43] [Server thread/WARN]: handleDisconnection() called twice
Additional Information
No response
Same thing happens on Forge.
I could paste here some logs and error messages but they are pretty much the same as ones above.
Game Version
Other
What platform are you using?
Forge
Platform version
1.18.2-40.1.84
Mod version
dcintegration-forge-2.4.7-1.18.2
Same error.
31.12 13:33:31 [Server] JDA MainWS-ReadThread/INFO [STDERR]: java.lang.NullPointerException: Cannot invoke "net.dv8tion.jda.api.entities.Member.getEffectiveName()" because the return value of "net.dv8tion.jda.api.entities.Guild.getMemberById(String)" is null