Tutorial - User Info Command

IMPORTANT: This tutorial expects that you’ve already done the ping command tutorial so you can understand the basics of making flows, placing blocks, and inserting variables.

In this tutorial, we will be building a simple slash command that shows information about a user.

image

Step 1 - Set Slash Command Trigger

Flow triggers decide what action will start your flow. In this case, because we’re making a user info command, we want to trigger our flow with a slash command.

Pick Slash Command from the trigger list.

image

Step 2 - Set Command Name and Description

Set an appropriate command name and description.

We’re using user-info as the command name and Get information about a user. as the description, but you can set it to anything you want.

You should click the Sync Command button once you’re done to sync the command with Discord. We don’t need to change any other options for this command.

Step 3 - Add Command Option for User

We want the person running the flow to be able to select a specific user that they want to retrieve information about. To do this, we’ll click the Add Option button on our slash command.

For the option type, we’ll select User. We’ll also set a basic option name and description. This will allow the user to select a user from a menu on Discord.

Set the option to required, since the user needs to select who they would like information on.

Step 4 - Add Get Server Member Block

Now that we have the user that the command was run on, we need to get information about that user. To do this, we’ll use the Get Server Member block.

Click the Add Block button, and select Get Server Member.

Step 5 - Insert Server ID and User ID Variables into Block

Now that we have the Get Server Member block, we need to insert the server ID and user ID variables into the block.

Click on the Insert Variable button under the Server ID field, and select Slash Command, then Server ID.

Click on the Insert Variable button under the User ID field, and select Slash Command, then user ID. This may be called something different if you set a different option name.

Step 6 - Add Embed Reply to Interaction Block

Now that we have all the necessary information about the user, we can send the information back to the user. To do this, we’ll use the Embed Reply to Interaction block.

Click the Add Block button, and select Embed Reply to Interaction.

Step 7 - Insert User Variables into Block

Now that we have the Embed Reply to Interaction block, we need to insert the user variables into the block.

There are a lot of ways to design your embed, and you can use any of the variables from the Get Server Member block.

For the example above, we use the ID, Username, and Avatar URL variables, but you can design the embed in any way you want.

Step 8 - You’re Done!

Go over to Discord to test it out. It should pop up in the slash command menu.

If it isn’t showing up, click on the Slash Command trigger at the top of the flow, and click Sync Command. It can take up to 5 minutes, but restarting your Discord client should force a sync.

If you’re confused or have any issues, ask in Support. We’re happy to help!