Warn Command

A complete guide to building a warn command

Step 1

The first step is to head over to the slash command builder

Step 2

Next, click 'New Custom Command' and give it a Name, Description, and Cooldown Target you would like. You can also toggle it NFSW and Empheral which means invisible replies. For now, I am going to title my command 'Warn', and give it a description of 'Warn a member'

Now that I have everything filled out, I am going to click 'Create'

Step 3

Once you create the command, it will appear at the end of your command list to enter the builder click the arrow on the far right of the command.

Step 4

Now you should be brought to the command builder. This is the area where you actually build the command. Let's start by heading over to our options list, I can get there by clicking on the navbar (the three lines on top of each other on the bottom left) and then clicking on the blocks icon.

Step 5

When you select the blocks icon a model will appear on the right. To go to the options page, we can click on the middle icon at the bottom with the three dots.

Step 6

Select and drag the member icon to the builder. Then click on the block and another model will appear with customization options. I will give it the name of 'user' and a description of 'user to warn' and set it to required. This is the block that is being used to target a user to warn them.

Step 7

We are then going to go back to our actions page get a text option and drag it to the builder. I am titling it 'reason' with a reason of 'reason your warning the user', and setting it to required. This is customizable and can customized to your liking. However, for the purpose of the tutorial I am going to be using 'reason'

Step 8

We are now done with options and can move on to actions. To get to the actions panel we are going to click on the actions icon on the bottom right next to the options. I am going to search for 'Set Variable' and drag it onto the builder, and connect it to the main green block by dragging the line from /warn to Set Variable block. Then, go back to your navigation bar and click the save button and click the arrow to your left to leave the builder.

Step 9

Once you are outside the builder go to 'Bot Variables' under Bot Info, and for the purpose of this guide I am going to name it 'modlogs', set the Type to 'user' as I want it unique per user, and set it to an array which means it can have multiple values. The default value is going to be set to 'None', and the scope is 'global', that way it syncs across Discords.

Step 10

Once that is done, head back to your command by going to Commands -> Find your command -> Click the arrow.

Step 11

Click on the 'Set Variable' block and when it asks for a Variable select the variable you just made from the dropdown. Set the user type to UserID and set the value to '{option_user[id]}' that will get the userID of the user you select from the user option we added earlier. If you named your option something different such as 'member', then the variable would be '{option_member[id]}' after that, set the Value to '⚠️ Warning - {option_reason}' once again, if you named your option to something other then reason fix it to match. Choose 'Add to End' from the Array Location that will add the warning to the last item on their record.

Step 12

Go back to your Actions options and select 'Send Embed' and drop it into the builder and select it. Then we are going to customize this embed on the left. Select Title and Author (you can add as many as you want, but for the purpose of the guide we are going to use those two) in the Embed Description option you can enter: <@!{option_user[id]}>, you have been warned for {option_reason}

To appeal, INSERT_LINK

You can customize it to your liking. In the embed color, you can click the color symbol to open the hex color picker and pick a color that best suits you. In the Embed Title section you can enter 'User Warned', in Embed Author Name 'Your Bot Name | Moderation', and add a link to an image for your Embed Author. Channel Type can be selected to Current Channel if you want all users to see it.

Step 13

Then select the duplicate button at the bottom and draw the line from the end of that block, to the top of the duplicate you just made.

Select the bottom block (the one you just made), scroll down to Channel Type, and change it to 'User DM' and in the 'User ID' enter '{option_user[id]}' that will DM the person who was warned letting them know they got a warning. Remember to change '{option_user[id]}' to the name of your user option if you change it.

Step 14

You can then drag and drop a 'Message Reply' and drag and drop it onto the builder. Select 'Reply to command' from 'Reply Type' and in the Message Content you can enter 'User was warned'

Step 15

You're done! That's it congratulations, you just made a warn command. Remember to save the builder by going to the nav bar and clicking save. You may also need to go back to your main commands page and enable the command by clicking the power button on the command til it's green.

Need help? No worries, join our Discord and make a support post.

Last updated