fix(eight_ball): improve response formatting by jakobdylanc · Pull Request #879 · allthingslinux/tux
- shortens question if >120 instead of not responding
- wraps response with a width of 30
after:
Response to "it's fixed?":
______________________________
< Yes, This is a 100% accurate >
< answer, do not question it. >
< Use this information promptly >
< and ignore all other sources. >
------------------------------
\
\
.--.
|o_o |
|:_/ |
// \ \
(| | )
/'\_ _/`\
\___)=(___/
shortened question example:
(input: All Things Linux is a 501(c)(3) non-profit organization with a mission to empower the Linux ecosystem through education, collaboration, and support.)
Response to "All Things Linux is a 501(c)(3) non-profit organization with a mission to empower the Linux ecosystem through...":
__________
< Absolutely >
----------
\
\
.--.
|o_o |
|:_/ |
// \ \
(| | )
/'\_ _/`\
\___)=(___/
Summary by Sourcery
Improve eight_ball command’s message styling by wrapping responses to a fixed width, shortening overly long questions instead of rejecting them, and unifying ASCII framing for both cow and default modes.
Enhancements:
- Shorten questions over 120 characters with an ellipsis placeholder instead of returning an error.
- Wrap and frame eight-ball answers to a default width of 30, adjusting border length for single-line responses.
- Unify ASCII art framing logic and append cow or default ASCII based on the cow flag.
