Jump to content

Discord Message API 0.0.9

   (1 review)

1 Screenshot

  • Image
  • 40.6k
  • 893
  • 13.66 kB
  • Update details
    v0.0.9
    Released
    Download size 13.66 kB
    Total versions 9
    Typical update pace About every 2 days
    Freshness Updated 844 days ago

About Discord Message API

   

For developers only.

SendDiscordMessage(string webhook, string username, string avatarUrl, string content, bool tts, List<List<object>> embeds)

 

 

Examples:

[PluginReference] Plugin DiscordMessageAPI;

if (DiscordMessageAPI == null)
{
    return;
}

DiscordMessageAPI.Call(
    "SendDiscordMessage",                                                                                                       // DiscordMessageAPI hook
    "https://discord.com/api/webhooks/000000000000000000/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", // Webhook (string)
    "Username",                                                                                                                 // Username (string)
    "",                                                                                                                         // Avatar URL (string)
    "Message text content.",                                                                                                    // Message content (string)
    true                                                                                                                        // Text-to-speech (bool)
);

 

List<List<object>> embeds = new List<List<object>>                                                                          // Embeds (List<List<object>>)
{
    new List<object>                                                                                                            // Embed0 (List<object>)
    {
        "Embed0 author name",                                                                                                       // Author name (string)
        "https://facepunch.com/",                                                                                                   // Author URL (string)
        "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Facepunchtransparent.png/440px-Facepunchtransparent.png",        // Author icon URL (string)
        "Embed0 title",                                                                                                             // Title (string)
        "https://rust.facepunch.com/",                                                                                              // URL (string)
        "Embed0 description",                                                                                                       // Description (string)
        15548997,                                                                                                                   // Color (int)
        new List<List<object>>                                                                                                      // Fields (List<List<object>>)
        {
            new List<object>                                                                                                            // Field0 (List<object>)
            {
                "Field0-Embed0 Name",                                                                                                       // Name (string)
                "Field0-Embed0 Value",                                                                                                      // Value (string)
                false                                                                                                                       // Inline (bool)
            },
            new List<object>                                                                                                            // Field1 (List<object>)
            {
                "Field1-Embed0 Name",                                                                                                       // Name (string)
                "Field1-Embed0 Value",                                                                                                      // Value (string)
                false                                                                                                                       // Inline (bool)
            },
            new List<object>                                                                                                            // Field2 (List<object>)
            {
                "Field2-Embed0 Name",                                                                                                       // Name (string)
                "Field2-Embed0 Value",                                                                                                      // Value (string)
                false                                                                                                                       // Inline (bool)
            }
        },
        "https://i.imgur.com/Clv8xfd.png",                                                                                          // Thumbnail URL (string)
        "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Facepunchtransparent.png/440px-Facepunchtransparent.png",        // Image URL (string)
        "Embed0 footer text",                                                                                                       // Footer text (string)
        "https://upload.wikimedia.org/wikipedia/commons/9/9f/Rust_logo.png"                                                         // Footer icon URL (string)
    },
    new List<object>                                                                                                            // Embed0 (List<object>)
    {
        "Embed1 author name",                                                                                                       // Author name (string)
        "https://rust.facepunch.com/",                                                                                              // Author URL (string)
        "https://i.imgur.com/Clv8xfd.png",                                                                                          // Author icon URL (string)
        "Embed1 title",                                                                                                             // Title (string)
        "https://facepunch.com/",                                                                                                   // URL (string)
        "Embed1 description",                                                                                                       // Description (string)
        5793266,                                                                                                                    // Color (int)
        new List<List<object>>                                                                                                      // Fields (List<List<object>>)
        {
            new List<object>                                                                                                            // Field0 (List<object>)
            {
                "Field0-Embed1 Name",                                                                                                       // Name (string)
                "Field0-Embed1 Value",                                                                                                      // Value (string)
                false                                                                                                                       // Inline (bool)
            },
            new List<object>                                                                                                            // Field1 (List<object>)
            {
                "Field1-Embed1 Name",                                                                                                       // Name (string)
                "Field1-Embed1 Value",                                                                                                      // Value (string)
                false                                                                                                                       // Inline (bool)
            },
            new List<object>                                                                                                            // Field2 (List<object>)
            {
                "Field2-Embed1 Name",                                                                                                       // Name (string)
                "Field2-Embed1 Value",                                                                                                      // Value (string)
                false                                                                                                                       // Inline (bool)
            }
        },
        "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Facepunchtransparent.png/440px-Facepunchtransparent.png",        // Thumbnail URL (string)
        "https://upload.wikimedia.org/wikipedia/commons/9/9f/Rust_logo.png",                                                        // Image URL (string)
        "Embed1 footer text",                                                                                                       // Footer text (string)
        "https://i.imgur.com/2uEAWXZ.png"                                                                                           // Footer icon URL (string)
    }
};

DiscordMessageAPI.Call(
    "SendDiscordMessage",                                                                                                       // DiscordMessageAPI hook
    "https://discord.com/api/webhooks/000000000000000000/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", // Webhook (string)
    "Username",                                                                                                                 // Username (string)
    "https://i.imgur.com/y28bSZi.png",                                                                                          // Avatar URL (string)
    "Message text content.",                                                                                                    // Content (string)
    false,                                                                                                                      // Text-to-speech (bool)
    embeds                                                                                                                      // Embeds (List<List<object>>)
);

User Feedback

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
3m
Total downloads
Customers
12k
Customers served
Files Sold
170.7k
Total sales
Payments
3.7m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.