JDA icon indicating copy to clipboard operation
JDA copied to clipboard

No regex url check for EmbedBuilder

Open xDec0de opened this issue 7 months ago • 1 comments

Pull Request Etiquette

Changes

  • [ ] Internal code
  • [x] Library interface (affecting end-user code)
  • [ ] Documentation
  • [ ] Other: _____

Closes Issue: NaN

Description

Just a simple change to avoid using a regex Pattern when checking if a URL is valid on the EmbedBuilder class. Instead, it relies on String#regionMatches (Case insensitive) and a simple length check to have the exact same behaviour as the current pattern. I know this may be considered micro optimization, but I found it and thought it could be an easy first PR for me.

xDec0de avatar Apr 23 '25 03:04 xDec0de