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

Update Checks for String in Messages 🧹 #525

Open
jameshughes89 opened this issue Apr 19, 2022 · 0 comments
Open

Update Checks for String in Messages 🧹 #525

jameshughes89 opened this issue Apr 19, 2022 · 0 comments
Labels
cleanup Refactoring or other making the code prettier good first issue Good for newcomers

Comments

@jameshughes89
Copy link
Collaborator

jameshughes89 commented Apr 19, 2022

As @twentylemon mentioned offline, it is possible to string away markdown and clean up the message contents before doing the search. In most cases this will have no real impact, but it will clean things up nonetheless.

An example where this would help is "This is a string with Tucker _Carlson_ in it" since Tucker _Carlson_ != Tucker Carlson. This way duckbot would still correct the message despite the markup.

https://discordpy.readthedocs.io/en/stable/api.html#discord.utils.remove_markdown
https://discordpy.readthedocs.io/en/stable/api.html#discord.Message.clean_content

@jameshughes89 jameshughes89 added good first issue Good for newcomers cleanup Refactoring or other making the code prettier labels Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Refactoring or other making the code prettier good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant