Discord.Net
Discord.Net copied to clipboard
Fix placeholder length being hardcoded
When the developer assigns a string to a TextInputBuilder.Placeholder, its length is checked against a hardcoded value. Extracting it out to a public variable makes it more consistent with the codebase and the developer can check if the placeholder is too long without having to hardcode it.
..... It's done this way because it's a discord restriction
..... It's done this way because it's a discord restriction
@Pusheon
I don't understand that.
Discord restricts placeholder length to maximum 100 characters, what does it have to do with not extracting it to a variable?
In SelectMenuBuilder it is extracted.
@Pusheon it doesn't matter if it's a Discord limit or a DNet limit. the purpose of this PR is the make the hardcoded value accessible to developers so they can check input lengths on their side without also hardcoding the value in their code (which would cause issues if it ever changed in DNet).