Tawmy / Leyla.Bot

Privacy-focused Administration Bot for Discord
0 stars 0 forks source link

Role and channel selects only support up to 25 elements #2

Closed Tawmy closed 1 year ago

Tawmy commented 2 years ago

Right now, Leyla requests the list of channels/roles, and shows the first 25 for selection, as per Discord API limitation. The original idea was to add either multiple dropdowns or paginated ones to work around this issue.

However, Discord has now updated the Interactions API to specifically allow for channel and role selects. This means the current implementation can be replaced by this new type.

It is unclear whether this will work with DSharpPlus out of the box, if it's already implemented in the nightly channel, or not implemented yet at all.

Tawmy commented 1 year ago

This can be implemented using DSharpPlus as soon as DSharpplus/Dsharpplus#1251 is merged.

Tawmy commented 1 year ago

PR is merged, hopefully the change is already reflected in the nightly builds. If so, work on this can begin!

Tawmy commented 1 year ago

Functionality wasn't quite right yet, DSharpplus/Dsharpplus#1409 should fix it.

Tawmy commented 1 year ago

Changes are implemented. For QA, it can easily be tested using the /configure command.

SafaiaArt commented 1 year ago



Roles

• Do all roles show up? ❌ Only the first 15 roles show up. Searching for a specific role beyond the first 15 (and selecting it) inside the dropdown menu works as expected. • Do the role configurations work and save your selections?

Channels

• Do all channels show up? ❌ Only the first 15 channels show up. Searching for a specific channel beyond the first 15 (and selecting it) inside the dropdown menu also works as expected. • Do the channel configs work and save your selections?

What I did:

• I created 13 extra roles, 27 in total • I looked through the dropdown menu to see how many roles appear • Since only the first 15 roles would appear, I only created 4 more text channels (16 channels in total) to see if the same would apply for channels (it did, as stated above) • I have tested many different role and channel configurations, all worked as expected. I was able to configure channels and roles without any issues.
 • I created a role and a channel named with an emoji, these work fine as well when searching for them in the drop down menu and selection.

Further notes

Regarding emoji channel/roles, you cannot search for them using text. For example, 

a role or channel named "👀" cannot be searched for successfully using "eyes" or ":eyes:". The actual emoji needs to be copied and pasted into the search bar for it to function. 

 

When entering gibberish (non-numerical values) into spam pressure configuration boxes, a generic “Something went wrong, try again” error shows up. 

 

Under “Raid” configuration > both "Raid Time" and "Lockdown Duration", it is unclear what a numerical value is supposed to translate to - seconds, minutes?

Tawmy commented 1 year ago

Thank you for the QA!

15 roles/channels max seems to be intended behaviour. It's not mentioned in the docs, but knowing Discord it's an arbitrary limit they decided on without telling anyone. Search showing elements not part of those first 15 elements supports this.

Regarding emoji channel/roles, you cannot search for them using text. For example, 

a role or channel named "👀" cannot be searched for successfully using "eyes" or ":eyes:". The actual emoji needs to be copied and pasted into the search bar for it to function.

Since the role select element comes from Discord, the bot cannot influence how it works -> intended behaviour



When entering gibberish (non-numerical values) into spam pressure configuration boxes, a generic “Something went wrong, try again” error shows up.

Out of scope for this ticket -> #16

Under “Raid” configuration > both "Raid Time" and "Lockdown Duration", it is unclear what a numerical value is supposed to translate to - seconds, minutes?

Out of scope for this ticket -> #15

Looks like the new inputs are doing what they are supposed to.