Skip to content

Conversation

@TizzySaurus
Copy link
Contributor

@TizzySaurus TizzySaurus commented Jul 14, 2022

Closes #100.

Does what the title says.

This util function will clean text if provided, else try and clean the referenced message, or if text isn't provided and was unable to get a reference message will return None raise a BadArgument error, as per Scaleois' review.

This is useful for commands such as lancebot's .uwu and .randomcase where users can either provide a text argument, or reply to a message and have the bot use the replied message's content.

NB: Currently a draft as untested Has now been tested so ready for review

@netlify
Copy link

netlify bot commented Jul 14, 2022

Deploy Preview for bot-core failed.

Name Link
🔨 Latest commit 2dd2236
🔍 Latest deploy log https://app.netlify.com/sites/bot-core/deploys/62dbfc1ec3fdf00008f99f33

@TizzySaurus TizzySaurus marked this pull request as draft July 15, 2022 21:55
@TizzySaurus
Copy link
Contributor Author

This has now been tested and it works 👍

Sample code usage:
image

Result of said sample:
image

This is now ready for review 😄

@TizzySaurus TizzySaurus marked this pull request as ready for review July 23, 2022 08:22
@HassanAbouelela HassanAbouelela added a: code Pull requests which add features, fixes, or any code change t: feature labels Jul 23, 2022
@HassanAbouelela HassanAbouelela added the s: changelog A pull request which is only pending a changelog to be merged label Jul 23, 2022
Only provides a feature and not a release, as per Scaleois' request on Discord: https://discord.com/channels/267624335836053506/635950537262759947/1000396893005819964
@HassanAbouelela HassanAbouelela removed the s: changelog A pull request which is only pending a changelog to be merged label Jul 23, 2022
@HassanAbouelela HassanAbouelela enabled auto-merge (rebase) July 23, 2022 13:47
@HassanAbouelela HassanAbouelela disabled auto-merge July 23, 2022 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: code Pull requests which add features, fixes, or any code change t: feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a convert_to_cleaned_text_or_reply util

3 participants