DiscordSRV

DiscordSRV

86.8k Downloads

%discordsrv_user_top_role_color_hex% not ignored when role is blacklisted from DiscordChatChannelRolesSelection config.

NyhmsQuest opened this issue ยท 2 comments

commented

Expected behavior

%discordsrv_user_top_role_color_hex% should not grab the top role color of a users role that's blacklisted in the setting DiscordChatChannelRolesSelection.

Actual behavior

%discordsrv_user_top_role_color_hex% not ignored when role is blacklisted from DiscordChatChannelRolesSelection config.
The placeholder still grabs the top role of a user who's top role is blacklisted in the config setting DiscordChatChannelRolesSelection.

Steps to reproduce

Setup roles you wish to blacklist in the setting DiscordChatChannelRolesSelection and then use the placeholder %discordsrv_user_top_role_color_hex% anywhere you'd like and you'll notice it still grabs the role color of the role blacklisted.

Server software and version

git-Purpur-2005 (MC: 1.20.1)*

Checks

  • I am not using an outdated version of DiscordSRV.
  • I asked in DiscordSRV's Discord server to see whether this issue is in fact a bug that needs to be fixed.

Anything else

No response

commented

Occurs here,

List<Role> selectedRoles = DiscordSRV.getPlugin().getSelectedRoles(member);
if (selectedRoles.isEmpty()) return "";
Role topRole = DiscordUtil.getTopRole(member);
it grabs the filtered roles but then just ignores them and grabs the first role

commented

You can now use %user_top_selected_role_color_hex% to ignore roles which are blacklisted in DiscordChatChannelRolesSelection (#1680)