DiscordSRV icon indicating copy to clipboard operation
DiscordSRV copied to clipboard

Role colors and names from roleid with placeholders.

Open LilSadPanda opened this issue 2 years ago • 3 comments

Why?

It would be an alternative to the following placeholder to directly use a role instead of top role etc.

%discordsrv_user_top_role_name%
%discordsrv_user_top_role_color_hex%
%discordsrv_user_top_role_color_code%

What and How?

Implement new placeholders that can return a color or name from given role ID for example

%discordsrv_roleid_name% = Cool Role Name
%discordsrv_roleid_color_hex% = #FFFFFF
%discordsrv_roleid_color_code% = &F&F&F&F&F&F

Are there alternatives?

Not that I know of :D.

Checks

  • [X] I have used the search at least once to check if my idea has already been suggested and perhaps already implemented.

Anything else

No response

LilSadPanda avatar Jan 22 '23 16:01 LilSadPanda

I think thats a really cool idea, the only thing is would every time the placeholder field is updated be a request to the discord api. Which depending on server sizes and could hit the 50 request/s limit if all scoreboards are updated at the same time and there isn’t a cache

NullTxt avatar Mar 02 '23 20:03 NullTxt

I think thats a really cool idea, the only thing is would every time the placeholder field is updated be a request to the discord api. Which depending on server sizes and could hit the 50 request/s limit if all scoreboards are updated at the same time and there isn’t a cache

Roles in the guild are cached by the bot internally, there would be minimal performance overhead

Scarsz avatar Mar 03 '23 05:03 Scarsz

I think thats a really cool idea, the only thing is would every time the placeholder field is updated be a request to the discord api. Which depending on server sizes and could hit the 50 request/s limit if all scoreboards are updated at the same time and there isn’t a cache

Roles in the guild are cached by the bot internally, there would be minimal performance overhead

Alright I'll start working on this at some point using the relational placeholders (makes it so they start with rel_discordsrv)

NullTxt avatar Mar 03 '23 16:03 NullTxt