Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erroneously deletes all semicolons and underscores #17

Closed
JstnMcBrd opened this issue Sep 25, 2022 · 0 comments · Fixed by #19
Closed

Erroneously deletes all semicolons and underscores #17

JstnMcBrd opened this issue Sep 25, 2022 · 0 comments · Fixed by #19
Labels
bug Something isn't working

Comments

@JstnMcBrd
Copy link
Owner

JstnMcBrd commented Sep 25, 2022

The replaceUnknownEmojis method is supposed to take custom Discord emojis (which are enclosed with semicolons and contain letters, underscores, and hyphens) and replace them with the name of the emoji, surrounded by asterisks.

Ex: :fight_me: -> *fight me*

However, this method doesn't differentiate between semicolons and underscores used for custom emojis, and those just used normally. It replaces every semicolon with an asterisk, and every underscore with a space. I should refactor this method to use regex to parse the input and only replace special characters used for custom emojis.

On a related note, it also forgets to replace hyphens with spaces.

(Duplicate issue with JstnMcBrd/Discord-Delphi#9)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant