#Breaking change on codeBlock function

18 messages · Page 1 of 1 (latest)

nimble flare
#

This thread is NOT to be confused with #1001614734203834499, it's about a different issue
So this PR https://github.com/discordjs/discord.js/pull/8369 introduced a breaking change since it changes the length of the resulting string, shouldn't there have been a warning about this? A command in my bot broke because of this

GitHub

Please describe the changes this PR makes and why it should be merged:
Adds a newline at the end of the codeblock, fixes #8368.
Status and versioning classification:

Code changes have been tested ...

#

I agree with the change in the PR as it does fix an issue, I just think this shouldn't have gone in v14 or at least it should've gotten a warning

uncut rune
#

sounds to me like your code was relying on a bug

nova remnant
#

We don't do semver-major for bugfixes, we already talked about this with other maintainers in #1000674404029698108

nimble flare
nimble flare
#

well didn't know that, but it's a bit annoying

uncut rune
#

what were you even relying on it for

#

truncating input?

#

and how would a length change break that

nimble flare
uncut rune
#

yea so just dont write bad code then

nimble flare
#

bruh?

uncut rune
#

make a general purpose function that takes an input string and the max length

#

and stop relying on a library to always output predictable string length

#

end of story

nimble flare
#

not everything in life needs to be a function

uncut rune
#

ok