Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

For commands that pass in the suggestion ID, escape non-letter/number characters #83

Open
acollierr17 opened this issue Mar 10, 2022 · 2 comments · May be fixed by #88
Open

For commands that pass in the suggestion ID, escape non-letter/number characters #83

acollierr17 opened this issue Mar 10, 2022 · 2 comments · May be fixed by #88
Assignees
Labels
enhancement New feature or request

Comments

@acollierr17
Copy link
Member

Based on the screenshot below, it can be problematic. I think this is in general will help going forward to alleviate any user-caused errors. I could also apply this to commands where the message ID is taken as an argument, but that might be a separate issue.
image

@acollierr17 acollierr17 added the enhancement New feature or request label Mar 10, 2022
@acollierr17 acollierr17 self-assigned this Mar 10, 2022
@alaninnovates
Copy link
Contributor

The regex [^0-9a-z] can be used to match any non-alphanumeric character. Then, the replace function can be used.

@acollierr17
Copy link
Member Author

The regex [^0-9a-z] can be used to match any non-alphanumeric character. Then, the replace function can be used.

Yup, that's exactly what I'll be doing. I actually have that regex pattern committed to memory for some reason 😂

This was referenced Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
2 participants