JDA
JDA copied to clipboard
No regex url check for EmbedBuilder
Pull Request Etiquette
- [x] I have checked the PRs for upcoming features/bug fixes.
- [x] I have read the contributing guidelines.
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.