Discord-Net-Labs / Discord.Net-Labs

An experimental fork of Discord.Net that implements the newest discord features for testing and development to eventually get merged into Discord.Net
https://labs.discordnet.dev
MIT License
156 stars 42 forks source link

Fix Application Command Validation #335

Closed Cenngo closed 2 years ago

Cenngo commented 2 years ago

This PR adds additional command validation steps aiming to give users more descriptive runtime exceptions and reduce the number of Invalid Form Body exception encounters.

quinchs commented 2 years ago

Why is this a draft?

Cenngo commented 2 years ago

For some reason, even though i switched to SlashCommandBuilder, SlashCommandBuilder.Name.set is still not throwing the intended error.

Cenngo commented 2 years ago

ofc, SlashCommandBuilder doesnt check if there is any uppercase letters in the command name. We should implement that in the core library.

quinchs commented 2 years ago

Do you want to make a PR for it?

Cenngo commented 2 years ago

Do you want to make a PR for it?

Yes, will do that tomorrow.

quinchs commented 2 years ago

Is this ready for review now?

Cenngo commented 2 years ago

Is this ready for review now?

Everything seems to be in order.