Friday, September 20, 2024 4:31:22 AM
> settings

Customize


Authenticate

> _fnc_logToDiscord.html.erb
<article class="uk-article">
    <h1 class="uk-article-title">ESM_fnc_logToDiscord</h1>
    <p class="uk-article-meta">Logs a message to the community's logging channel on Discord</p>
    <h4 class="uk-margin-remove">Input: <code><span class="esm-text-color-toast-yellow">&lt;ARRAY&gt;</span></code></h4>
    <dl class="uk-description-list">
        <dd><code>_this select 0: <span class="esm-text-color-toast-blue">_type</span> <span class="esm-text-color-toast-yellow">&lt;STRING&gt;</span></code></dd>
        <dd>What type of message is being sent. This will change the color of the bar on the side of the message<br>Available options: <code>"info"</code>(blue), <code>"success"</code>(green), <code>"warn"</code>(yellow), <code>"error"</code>(red)</dd>
        <dd><code>_this select 1: <span class="esm-text-color-toast-blue">_template</span> <span class="esm-text-color-toast-yellow">&lt;STRING&gt;</span></code></dd>
        <dd>Which message template to use. Available options: <code>"message"</code>, <code>"embed"</code></dd>
        <dd><code>_this select 2: <span class="esm-text-color-toast-blue">_parameters</span> <span class="esm-text-color-toast-yellow">&lt;ARRAY&gt;</span></code></dd>
        <dd>
            If <code>_template</code> is <code>"message"</code>:
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp;- The message to be sent <code><span class="esm-text-color-toast-yellow">&lt;STRING&gt;</span></code> 
            <br>
            If <code>_template</code> is <code>"embed"</code>:
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp;- Parameters for the embed <code><span class="esm-text-color-toast-yellow">&lt;ARRAY&gt;</span></code> 
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <code><code>_parameters select 0: <span class="esm-text-color-toast-blue">_title</span> <span class="esm-text-color-toast-yellow">&lt;STRING&gt;</span></code></code>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <code><code>_parameters select 1: <span class="esm-text-color-toast-blue">_description</span> <span class="esm-text-color-toast-yellow">&lt;STRING&gt;</span></code></code>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <code><code>_parameters select 2: <span class="esm-text-color-toast-blue">_fields</span> <span class="esm-text-color-toast-yellow">&lt;ARRAY&gt;</span></code></code>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fields formatted as follows: <code>[field_name <span class="esm-text-color-toast-yellow">&lt;STRING&gt;</span>, field_value <span class="esm-text-color-toast-yellow">&lt;ANY&gt;</span>, inline <span class="esm-text-color-toast-yellow">&lt;BOOL&gt;</span>]</code>
        </dd>
    </dl>
    <h4 class="uk-margin-remove">Examples</h4>
    <pre>["info", "message", ["Hi! This is just a message to log to discord. :)"]] call ESM_fnc_logToDiscord;</pre>
    <pre>
[
    "success",
    "embed",
    [
        "This is a title",
        "This is a description",
        [
            ["Field_1_Name", "Field_1_Value"],
            ["Field_2_Name", "Field_2_Value", true]
        ]
    ]
]
call ESM_fnc_logToDiscord;
    </pre>  
    <br>
</article>
All opinions represented herein are my own
- © 2024 itsthedevman
- build 340fbb8