Yesterday, I added a new command:rs let assign_to_league = CommandBuilder::new("assign to league", "toggle aa league role", CommandType::User) .guild_id(Id::new(606254910438375434)) .nsfw(false) .validate()? .build();This worked fine. Then I added:rs let delete_message = CommandBuilder::new("delete message", "delete the selected message", CommandType::Message) .guild_id(Id::new(606254910438375434)) .nsfw(false) .validate()? .build();and now neither are compiling. I have used cargo clean to no avail. I didn't change anything. The traceback is mentions:rs Error: command description must be between 1 and 100 charactersand it of course is between 1 and 100 characters. What could the issue possibly be?
#CommandBuilder::new() quit working and I can't figure it out
1 messages · Page 1 of 1 (latest)
Full traceback
Note this error occurs at runtime when connecting the client to discord, not at compile time
I think it is because only CommandType::ChatInput is allowed to have descriptions, but that is an awful error for that
Would you have anything opening a issue with the misleading error
Source of the Rust file twilight-validate/src/command.rs.
This is the code you are hitting
You're right, I removed the description and replace it with a blank string "" and now it is working. That is an awful error message. I'll open an issue
Now that I am looking at the code running since yesterday, I see that I actually did have a blank string yesterday, and must have added the description to assign_to_league after it was running (I also added delete_message with it's description since then too)
Would a better way of handling this be to simply silently send a blank string (and perhaps throw a warning rather than an error) if there is a description present?