You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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)
The text was updated successfully, but these errors were encountered: