# Management Master Tutorial

**This configuration takes place in the `/configuration/management.json`**\*\* file!\*\*

{% hint style="warning" %}
**You might need Discord Developer Mode on to get ID's and such!**
{% endhint %}

{% hint style="success" %}
**Key words:**

<mark style="color:yellow;">**`Boolean:`**</mark> A <mark style="color:green;">**`true`**</mark> or <mark style="color:green;">**`false`**</mark> switch

<mark style="color:yellow;">**`String:`**</mark> An assortment of <mark style="color:green;">**`"text"`**</mark> or <mark style="color:green;">**`"numbers"`**</mark> like this

<mark style="color:yellow;">**`Numbers:`**</mark> Just numbers!

<mark style="color:yellow;">**`Array:`**</mark> Strings or Numbers<mark style="color:green;">**`["in", "a", "pattern", "like", "this"]`**</mark>
{% endhint %}

## <mark style="color:blue;">Welcome!</mark>

Here we'll go over the Management Plugin setup in its entirety, with brief (or not so brief!) explanations Everything is separated in the best possible way so that the sidebar has quick references to search for.

### <mark style="color:green;">Feedback is welcome!</mark>

If you think something is missing, or needs a bit more work, then make sure to leave us a note at [our support server!](https://discord.iynxdev.com/)

***

## <mark style="color:blue;">Logging Configuration</mark>

This config is the great part about the Management Plugin! It really lets you get into the deep end of what you want logged or not. Thankfully, all these are just simple <mark style="color:green;">**`Boolean`**</mark> switches. The names themselves are pretty self-explanatory, so I'll skip over explaining and breaking them down.

<details>

<summary><strong>Logging Config Snippet</strong></summary>

```json5
        logs: {
            channel_create: true,
            channel_delete: true,
            channel_update: true,
            emoji_create: true,
            emoji_delete: true,
            emoji_update: true,
            member_join: true,
            member_leave: true,
            member_update: true,
            invite_create: true,
            invite_delete: true,
            invite_update: true,
            message_delete: true,
            message_update: true,
            role_create: true,
            role_delete: true,
            role_update: true,
            sticker_create: true,
            sticker_delete: true,
            sticker_update: true,
            thread_create: true,
            thread_delete: true,
            voice_state: true,
            command_execute: true,
            direct_message: true,
        },
```

</details>

***

## <mark style="color:blue;">Welcome Messages</mark>

A neat little thing that Athena can do, which is create a welcome message for joining members! Let's say we wanna set up an image welcome message for our server!

### <mark style="color:yellow;">Enabling Module</mark>

We'd first want to enable our module!

<details>

<summary><strong>Welcome Message Enable Config Example</strong></summary>

```json5
        // Whether this module should be enabled (Boolean)
        enabled: true,
```

</details>

### <mark style="color:yellow;">Embed or Image</mark>

Next, we can select whether our welcome message will be an embed or an image. Embeds are what they sound like, Images are actually interchangeable and replaceable! (To replace them, you have to go through your bot directory, specifically <mark style="color:green;">**`/plugins/management/data/images/`**</mark> and you can replace them with <mark style="color:green;">**`.png/.jpeg`**</mark> files with a resolution of <mark style="color:green;">**`1280x853`**</mark>.

For now, we're trying to set it up as an image, so we use this:

<details>

<summary><strong>Welcome Message Selector Config Example</strong></summary>

{% code fullWidth="false" %}

```json5
            // Configuration option "type" can be either set to IMAGE or
            // EMBED. If set to IMAGE a welcome card will be generated
            // instead of an embed. If set to EMBED a message will be
            // generated which can be configured in configuration file 
            // lang.json (String)
            type: "IMAGE",
```

{% endcode %}

</details>

### <mark style="color:yellow;">Message Customization</mark>

In the case you wanted to set up a specific message for the welcome images, you can customize that here! If you set it to Embed (which we aren't) then you can ignore it safely since it doesn't apply to you:

<details>

<summary><strong>Welcome Messages Image Config Example</strong></summary>

```json5
            // The following configuration option can be ignored if welcome
            // type was set to "EMBED". Title and description defines with
            // what text the image is being generated. The text is displayed
            // below the user's avatar (String)
            image: {
                // Available placeholder for both options: %user%, %member_size%
                // If you'd like to see other placeholders please let us know
                title: "Welcome %user%!",
                description: "Member #%member_size%",
            },
```

</details>

For example, if you wanted to have the welcome message say "Welcome Wumpus!" and show the member number they are, you can set it up as above!

### <mark style="color:yellow;">Welcome Ping</mark>

After that, we want to determine whether people get pinged for their welcome messages. In our case, we don't want this, so we disable it.

<details>

<summary><strong>Welcome Messages Ping Config Example</strong></summary>

```json5
            // Whether the user should get pinged at their welcome 
            // message (Boolean)
            mention_user: true,
```

</details>

### <mark style="color:yellow;">Emoji Selection</mark>

We have the opportunity to choose from an emote, whether it be a custom one or a built-in one, for the reaction that gets attached to the welcome message! We can even choose whether we want it on or off. In this case, I don't want it to react to the welcome message, so it doesn't matter what emoji I attach to it, since it'll never react to it.

<details>

<summary><strong>Welcome Messages Emoji Config Example</strong></summary>

```json5
            emoji: {
                // Whether this module should be enabled (Boolean)
                enabled: false,
                // Custom or default Emoji (String)
                // * Default: https://emojidb.org/discord-copy-and-paste-emojis - 
                // * Custom: https://support.discord.com/hc/en-us/community/posts/360038896012-Can-Get-Emoji-ID-When-You-re-On-Chrome
                emoji: "👋",
            },
```

</details>

### <mark style="color:yellow;">Message on Verification</mark>

If you have the verification system set up, this hooks into that, meaning that once people actually verify, the welcome message will send after that point, instead of immediately and automatically on join. I want only people that go through the verification get welcomed, so I set it up accordingly.

<details>

<summary><strong>Welcome Messages Verification Config Example</strong></summary>

```json5
            // Whether the welcome message should only be sent after a
            // successfull verification (Boolean)
            send_after_verification: true,
```

</details>

### <mark style="color:yellow;">DM on Welcome</mark>

And last but not least, we can automatically message any joining users a welcome message as well. I want this to happen, so I change the config as needed.

<details>

<summary><strong>Welcome Messages DM Config Example</strong></summary>

```json5
            // If set to true an additional welcome message will be sent
            // in the user's direct messages. The content of this message
            // can be edited in the configuration file lang.json (Boolean)
            dm_message: true,
        },
```

</details>

***

## <mark style="color:blue;">Goodbye Messages</mark>

Another neat feature, Athena can also create a goodbye message for leaving members! Let's configure this for our server!

### <mark style="color:yellow;">Enabling Module</mark>

We'd first want to enable our module!

<details>

<summary><strong>Goodbye Message Enable Config Example</strong></summary>

```json5
        // Whether this module should be enabled (Boolean)
        enabled: true,
```

</details>

### <mark style="color:yellow;">Embed or Image</mark>

Next, we can select whether our goodbye message will be an embed or an image. Embeds are what they sound like, Images are actually interchangeable and replaceable! (To replace them, you have to go through your bot directory, specifically <mark style="color:green;">**`/plugins/management/data/images/`**</mark> and you can replace them with <mark style="color:green;">**`.png/.jpeg`**</mark> files with a resolution of <mark style="color:green;">**`1280x853`**</mark>, **these images are shared with the welcome messages.**

But for now, we're trying to set it up as an image, so we use this:

<details>

<summary><strong>Goodbye Message Selector Config Example</strong></summary>

{% code fullWidth="false" %}

```json5
            // Configuration option "type" can be either set to IMAGE or
            // EMBED. If set to IMAGE a goodbye card will be generated
            // instead of an embed. If set to EMBED a message will be
            // generated which can be configured in configuration file 
            // lang.json (String)
            type: "IMAGE",
```

{% endcode %}

</details>

### <mark style="color:yellow;">Message Customization</mark>

In the case you wanted to set up a specific message for the welcome images, you can customize that here! If you set it to Embed (which we aren't) then you can ignore it safely since it doesn't apply to you:

<details>

<summary><strong>Goodbye Messages Image Config Example</strong></summary>

```json5
            // The following configuration option can be ignored if welcome
            // type was set to "EMBED". Title and description defines with
            // what text the image is being generated. The text is displayed
            // below the user's avatar (String)
            image: {
                // Available placeholder for both options: %user%, %member_size%
                // If you'd like to see other placeholders please let us know
                title: "Goodbye %user%",
                description: "Member #%member_size%",
            },
```

</details>

For example, if you wanted to have the goodbye message say "Goodbye Wumpus!" and show the member number they were, you can set it up as above!

### <mark style="color:yellow;">Emoji Selection</mark>

We have the opportunity to choose from an emote, whether it be a custom one or a built-in one, for the reaction that gets attached to the goodbye message! We can even choose whether we want it on or off. In this case, I don't want it to react to the goodbye message, so it doesn't matter what emoji I attach to it, since it'll never react to it.

<details>

<summary><strong>Goodbye Messages Emoji Config Example</strong></summary>

```json5
        // If enabled this module will react with a set emoji to all
        // new generated welcome messages or images.
        emoji: {
            // Whether this module should be enabled (Boolean)
            enabled: false,
            // Custom or default Emoji (String)
            // * Default: https://emojidb.org/discord-copy-and-paste-emojis - 
            // * Custom: https://support.discord.com/hc/en-us/community/posts/360038896012-Can-Get-Emoji-ID-When-You-re-On-Chrome
            emoji: "👋",
        },
    },
```

</details>

## <mark style="color:blue;">Auto Roles</mark>

Athena will automatically provide whatever role(s) you give it if this module is enabled. Useful for those not using the verification role system, just want to give people roles automatically, etc.

<details>

<summary>Auto Role Config Snippet</summary>

```json5
        // "auto_roles" is a feature that applies a set list of roles
        // to any user who joins your Discord server. This can be used
        // to automatically apply notification roles, a member role if
        // you wish to disable the verification system or just an 
        // unverified role.
        auto_role: {
            // Whether this module should be enabled (Boolean)
            enabled: false,
            // List of roles that should be applied to any new user.
            // This configuration option requires role ids (Array) 
            roles_to_add: ['804354038987882588'],
        },
```

</details>

## <mark style="color:blue;">Auto Thread Reaction</mark>

For those looking for a Reddit style upvote/downvote system, this is for you. This allows you to set up emojis to show up at the bottom of threads, which are fully customizable. If we wanted to get a reddit-like system going, we just have to set it up like so:

### <mark style="color:yellow;">Enabling Module</mark>

We'd first want to enable our module!

<details>

<summary><strong>Auto Thread Reaction Enable Config Example</strong></summary>

```json5
            // Whether this module should be enabled (Boolean)
            enabled: false,
```

</details>

### <mark style="color:yellow;">Choosing Forum Channel</mark>

Then we copy the ID of the Forum channel (the main channel where all the threads will be made) and paste it here.

<details>

<summary><strong>Auto Thread Reaction Forum Config Example</strong></summary>

```json5
            // Forum channel id (String)
            parent_id: "1155463362377961615",
```

</details>

### <mark style="color:yellow;">Emoji Selection</mark>

And finally, we choose the emojis we want for the new forum channels to have!

<details>

<summary><strong>Auto Thread Reaction Emoji Config Example</strong></summary>

```json5
            // List of emojis to add to each new thread. This configuration
            // option supports standard and custom emojis. If you choose to
            // use standard emojis take a look at this website to get a copy
            // of the emoji: 
            // * https://emojidb.org/discord-copy-and-paste-emojis
            //
            // If you choose to use custom emojis the ID is required. Take a 
            // look at the following website to learn more about how to get
            // custom emoji ids:
            // * https://support.discord.com/hc/en-us/community/posts/360038896012
            emojis: ["✅", "❌"],
        },
```

</details>

And that's it! Now any new threads under that forum channel will have emojis to react to for upvotes and downvotes.

## <mark style="color:blue;">Auto Message Response</mark>

This module takes care of posting specific messages based on regex! So it works kind of like the Automod, reading chat and posting a message in response to another message being in chat. Let's say we wanted a person to get a link to a website if they said 'website'.

### <mark style="color:yellow;">Enabling Module</mark>

We'd first want to enable our module!

<details>

<summary><strong>Auto Message Enable Config Example</strong></summary>

```json5
            // Whether this module should be enabled (Boolean)
            enabled: false,
```

</details>

### <mark style="color:yellow;">Regex</mark>

Then we tell the bot what to react to, in this instance, we want it to react to the plain text 'website'

<details>

<summary><strong>Auto Message Regex Config Example</strong></summary>

```json5
                    // Regex is used to determain whether a message inherits the
                    // keyword. Please do not provide regex flaggs (String)
                    // * For more information view https://en.wikipedia.org/wiki/Regular_expression.
                    // * Website to help you building your regex: https://regex101.com/
                    // If you have any questions create a ticket
                    regex: "website",
```

</details>

### <mark style="color:yellow;">Predefined Message ID</mark>

Next, we move onto the message that the bot will send, which in this case, has to be a predefined message ID (meaning you have to create the message using /sendmsg (an embed or plaintext will work!). Since I made a predfined message ID with the name 'website', I can just write it here.

<details>

<summary><strong>Auto Message Message ID Config Example</strong></summary>

```json5
                    // The response for this keyword must be configured using
                    // the /sendmsg and /editmsg command in your Discord.
                    // Once you have configured a message to your liking
                    // press the save button to assign your message design
                    // a specified predefined message id which you must 
                    // put down below (String)
                    predefined_message_id: "website",
```

</details>

### <mark style="color:yellow;">Autodelete Timer</mark>

Next up, autodelete timer. I want people to see the link, and not have it linger in chat, so I can set the timer to be just about 10 seconds, so I change it accordingly.

<details>

<summary><strong>Auto Message Auto Delete Config Example</strong></summary>

```json5
                    // After a set time the response will be automatically
                    // deleted. If you wish to leave the message permanently
                    // in the channel set following option to false (Number/false)
                    auto_delete_after_seconds: 10,
```

</details>

### <mark style="color:yellow;">Permissions Role</mark>

Almost done! Now I want *everyone* to be able to use this, so I set it to 'everyone' on the config file:

<details>

<summary><strong>Auto Message Permission Role Config Example</strong></summary>

```json5
                    // The permissions that are required for this auto response to
                    // trigger. This addon hooks into the core permission config 
                    // and works the exact same way as any commands or interactions.
                    // For more information please visit the permission config.
                    // The following option requires a role from the "permission_levels"
                    // list unless the built in permission system is disabled,
                    // then it will be ignored (String)
                    permission_role: "everyone",
```

</details>

### <mark style="color:yellow;">Ticket Channel</mark>

And finally, I want everyone to be able to use this everywhere, regardless of if it's a ticket or not, so here we go!

<details>

<summary><strong>Auto Message Ticket Channel Config Example</strong></summary>

```json5
                    // Whether this automatic response can only be triggered
                    // in ticket channels (Boolean)
                    ticket_only: false,
                },
```

</details>

And that's it! We got the Auto Message configured! Now when someone says the word 'website', they'll be able to get an automated message with the website details I wanted to give them!

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iynxdev.com/plugins/management/management-master-tutorial.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
