# Receiving Events

Now that we went through all the parameters, We need to execute an action with all of these parameters. Your code should look like this after registering the parameters.

```lua
local MyCommand = CustomCommands:RegisterCommand("CC")
MyCommand.Alias = "Custom Command"
MyCommand.Description = "Amazing Description goes here..."
MyCommand.Icon = "rbxassetid://11419714821"
MyCommand.Event = MyEvent

MyCommand:AddParameter("Player", {
	Name = "Amazing Player", --// Parameter name.
	SelectionRange = NumberRange.new(1, 1), --// Minimum & Maximum selection of players.
})

MyCommand:AddParameter("Slider", {
	Name = "Amazing Slider", --// Parameter name.

	SliderDefault = 50, --// Default value when the slider is opened.
	SliderIncrement = 10, --// Increment between the values.
	SliderRange = NumberRange.new(0, 100), --// Minimum value & Maximum value.
})

MyCommand:AddParameter("Textbox", {
	Name = "Amazing Text Box", --// Parameter name.
})

MyCommand:AddParameter("Boolean", {
	Name = "Amazing Boolean", --// Parameter name.
})

MyCommand:AddParameter("Enum", {
	Name = "Amazing Enum", --// Parameter name.
	Items = game.Workspace:GetChildren(), --// Table of items in the list.
	SelectionRange = NumberRange.new(1, 5) --// Minimum & Maximum of items you can select.
})
```

With this ready, We will use the event we assigned into the attribute `MyCommand.OnServerEvent`, Check this example

<pre class="language-lua"><code class="lang-lua"><strong>MyEvent.OnServerEvent:Connect(function(moderator, data)
</strong>    print(data)
end)
</code></pre>

With that done, Our data should return our parameters and their response, Like this.

```
{
    ["Amazing Boolean"] = false,
    ["Amazing Enum"] = {},
    ["Amazing Player"] = {},
    ["Amazing Slider"] = 50,
    ["Amazing Text Box"] = ""
  }
```
