# Custom Commands

Custom commands allow you to create personalized commands that users can trigger with a prefix. You can configure these commands to send either text messages or embeds with buttons.

### Basic Configuration

In your `config.yml`, custom commands are configured under the `CustomCommands` section. Here are the two key settings:

```yaml
CommandsEnabled: true
CommandsPrefix: "!"
```

### Examples

#### MongoDB Setup Command

This command provides users with links and information for setting up MongoDB. It includes rich embeds with detailed descriptions and action buttons for quick navigation.

{% code expandable="true" %}

```yaml
CustomCommands:
  mongo:
    type: "EMBED"
    Embed:
      Title: "📊 MongoDB Setup Guide"
      Description:
        - "To get started with MongoDB, follow the detailed guide provided below. This guide will assist you in setting up MongoDB efficiently and correctly."
        - ""
        - "Need further assistance? Don't hesitate to open a support ticket."
      Footer:
        Text: "Drako Development | MongoDB Setup"
        Icon: "https://i.imgur.com/w5XxKpc.png"
      Color: "#1769FF"
    Roles:
      Whitelist: ["1272331356445347840", "1196187304008622101"]
    Options:
      DeleteTriggerMessage: false
      ReplyToUser: false
    Buttons:
      - Type: "LINK"
        Name: "MongoDB Setup"
        Emoji: "📑"
        Link: "https://docs.drakodevelopment.net/misc/mongodb-setup"
      - Type: "LINK"
        Name: "Wiki"
        Emoji: "📕"
        Link: "https://docs.drakodevelopment.net/"
```

{% endcode %}

#### Welcome Command

A welcoming command that dynamically greets new users, provides a quick start guide, and includes interactive buttons for further exploration.

{% code expandable="true" %}

```yaml
CustomCommands:
  welcome:
    type: "EMBED"
    Embed:
      Title: "🎉 Welcome to Drako Development!"
      Description:
        - "Hello {userMention}! We're glad you've joined our community of {memberCount} developers."
        - "Here's a quick guide to get you started:"
      Fields:
        - Name: "🚀 Quick Start"
          Value: "• Introduce yourself in #introductions\n• Set roles in #role-assignment\n• Check #announcements for updates"
          Inline: false
        - Name: "🆘 Need Help?"
          Value: "Visit #support or use `/ticket` for assistance."
          Inline: false
      Footer:
        Text: "Joined on {longTime}"
        Icon: "https://i.imgur.com/w5XxKpc.png"
      Author:
        Text: "Drako Development Team"
        Icon: "https://i.imgur.com/w5XxKpc.png"
      Color: "#1769FF"
    Roles:
      Whitelist: []
    Options:
      DeleteTriggerMessage: true
      ReplyToUser: true
    Buttons:
      - Type: "LINK"
        Name: "Documentation"
        Emoji: "📚"
        Link: "https://docs.drakodevelopment.net"
      - Type: "REPLY"
        Name: "Quick Tour"
        Emoji: "🗺️"
        Style: "Primary"
        Reply:
          Type: "TEXT"
          Ephemeral: true
          Embed:
            Title: "🗺️ Quick Server Tour"
            Description:
              - "📢 #announcements - Latest news"
              - "💡 #ideas-and-feedback - Share suggestions"
              - "🤖 #bot-commands - Test our bots"
              - "🎓 #tutorials - Learn new skills"
            Footer:
              Text: "Enjoy your stay at Drako Development!"
              Icon: "https://i.imgur.com/w5XxKpc.png"
            Author:
              Text: "Server Guide"
              Icon: "https://i.imgur.com/w5XxKpc.png"
            Color: "#4CAF50"
            Image: "https://i.imgur.com/w5XxKpc.png"
            Thumbnail: "https://i.imgur.com/w5XxKpc.png"
            Timestamp: true
            Fields:
              - Name: "Important Links"
                Value: "Check out our [website](https://docs.drakodevelopment.net/)"
                Inline: true
              - Name: "Support"
                Value: "Need help? Create a ticket!"
                Inline: true
```

{% endcode %}

### Additional Notes

* **Available Placeholders:**&#x20;

  ```yaml
  {guildName}, {guildId}, {userName}, {userId}, {userMention}, {channelName}, {channelId}, {channelMention}, {commandName}, {longTime}, {shortTime}, {memberCount}
  ```
