They're here!?! They slash, they dice, they let you right click users and boop them, they provide you choices and let you get the best of all world! I hope you are all as excited as I am to finally get this out into the wild. There's a lot to test, and a lot to read, so have at it! I've added a table of contents here so you can jump straight to what matters most to you.

⚠️ Before we begin!

This is v1 of Application Command support in Sapphire. Things may change in a future version if we think of better ways of doing things! Your feedback is still super important after reading this document!! As such, the [#application-commands-and-interactions](<https://discord.com/channels/737141877803057244/889973175583133717>) channel in our Discord server awaits you~ 😄


Table of contents

A tip from our sponsor Manscaped developer Vladdy

You will notice that with these new features, you may encounter a lot of code duplication, especially if you plan on supporting all 3 types of commands. While we cannot control how you code your bot, we have a recommendation for you: abstract the argument parsing from the final function.

What does this mean? As an example let's take a look at a ban command: it needs to process the member to ban as well an optional reason, action the member, and reply to the invoker of the command. In your *Run methods, you should parse the member and reason, then pass those down to a method you build that handles the actual banning and replying to the invoker.

However you end up handling situations like this will be up to you, but this is my tip for you. 😄

Commands and Preconditions

Due to the extend of the changes made to Commands and Preconditions, I have created smaller pages for these subjects. Just click on either of them below, and you can read what has changed. There are a lot of changes to take in consideration, so grab a cup of your favorite drink*, whatever it may be,* and brace for a lot of reading!

Commands

Preconditions

Autocomplete Interactions

Certain chat input command options (at the time of writing this just the string and number options) can be autocompleted based on what the user is writing.

This gave me a dilemma: where do you put the handler for this? Do you put it in the command for which you autocomplete an option or in an interaction handler? The answer was obvious after asking all of you peeps...

https://i.kym-cdn.com/photos/images/masonry/001/891/187/bb6.jpg