/role fails to look up roles with logical operators when using autocomplete #218

Open
opened 2026-06-27 01:11:03 +00:00 by TenType · 0 comments
TenType commented 2026-06-27 01:11:03 +00:00 (Migrated from codeberg.org)

Overall Objective

The /role slash command fails to look up users when selecting a role via the autocomplete dropdown if that role name contains a logical operator such as or / and (e.g. Boss and McGill).

To reproduce, run /role members in the CMU Class of 2030+ server and type Boss. Click on the autocomplete Boss and McGill. The role command returns "Role not found: Boss", when it should have returned all users with the Boss and McGill role.

Suggested Approach

For now, wrap quotes around any autocompleted role's value. You'll edit this code.

Note that this doesn't fix the error if the user types out the roles, just single role autocomplete (we'll figure out a way to fix the others later)

### Overall Objective The `/role` slash command fails to look up users when selecting a role via the autocomplete dropdown if that role name contains a logical operator such as `or` / `and` (e.g. `Boss and McGill`). To reproduce, run `/role members` in the CMU Class of 2030+ server and type `Boss`. Click on the autocomplete `Boss and McGill`. The role command returns "Role not found: Boss", when it should have returned all users with the `Boss and McGill` role. ### Suggested Approach For now, wrap quotes around any autocompleted role's `value`. You'll edit [this code](https://codeberg.org/ScottyLabs/dalmatian/src/commit/742de6bf7ad2b95d41578b1252c4781b85a73149/src/commands/role.ts#L212-L217). Note that this doesn't fix the error if the user types out the roles, just single role autocomplete (we'll figure out a way to fix the others later)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
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
ScottyLabs/dalmatian#218
No description provided.