Closed SpellignErr closed 5 months ago
I have resolved the part of the misleading error message in #2329.
I am not sure it is a good idea to silently fix the issue by for example just emptying the string when it is a Message or User command since it can lead to expectation that something should work, but it is stripped off before it is sent.
https://github.com/twilight-rs/twilight/blob/29d213393b863aff6e013822299baff91539e643/twilight-validate/src/command.rs#L328
When creating a new command of
CommandType::Message
orCommandType::User
a description is not allowed. If attempting to create a command of either of these types with a description, Twilight will throw an error:Error: command description must be between 1 and 100 characters
. This error is of course incorrect.This brings about a design choice: Should the crate err at all under these circumstances? Or is it an acceptable choice to simply replace the description with a blank string, and send a warning.
Example code:
Error:
Traceback is available upon request or at https://discord.com/channels/745809834183753828/1193659646112698418/1193659836584448051