How to use the webhook-discord.Webhook function in webhook-discord

To help you get started, we’ve selected a few webhook-discord examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aarmora / jordan-scrapes-amazon-for-products-to-sell / src / massSearch.ts View on Github external
(async () => {
    const dbUrl = `mongodb://${config.mongoUser}:${config.mongoPass}@${config.mongoUrl}/${config.mongoDb}`;
    const db = await dbHelpers.initializeMongo(dbUrl);
    const hook = new Webhook.Webhook(config.webhookUrl);
    const sampleCategories = getRandomFromArray(categories, 100);
    for (let index = 0; index < sampleCategories.length; index++) {
        const category = sampleCategories[index];
        try {
            console.log('sample categories', index, category);
            const products = await scrapeResults(category, numberOfPagesToSearch, wantSoldByAmazon, minimumAllowedNumberOfVendors, minimumPrice);
            console.log('Products', products.length, category, sampleCategories.length, index);

            // Insert to database
            // Check if it already exists
            if (products.length > 0) {
                try {
                    for (let i = 0; i < products.length; i++) {
                        const product = products[i];
                        try {
                            const matches = await dbHelpers.getAllFromMongo(db, config.mongoCollection, { asin: product.asin });
github GmodNET / GmodDotNet / node / discord-windows-fail.js View on Github external
let webhook = process.argv[2];
let branch = process.argv[3];
let commit = process.argv[4];
let commit_message = process.argv[5];

const whook = require("webhook-discord");

const hook = new whook.Webhook(webhook);

hook.err("Travis CI", "**Build failed tests on Windows**: " + branch + " " + commit + " " + "\"" + commit_message + "\"");
github GmodNET / GmodDotNet / node / discord-linux-success.js View on Github external
let webhook = process.argv[2];
let branch = process.argv[3];
let commit = process.argv[4];
let commit_message = process.argv[5];

const whook = require("webhook-discord");

const hook = new whook.Webhook(webhook);

hook.success("Travis CI", "**Build successfully passed tests on Linux**: " + branch + " " + commit + " " + "\"" + commit_message + "\"");
github GmodNET / GmodDotNet / node / discord-linux-fail.js View on Github external
let webhook = process.argv[2];
let branch = process.argv[3];
let commit = process.argv[4];
let commit_message = process.argv[5];

const whook = require("webhook-discord");

const hook = new whook.Webhook(webhook);

hook.err("Travis CI", "**Build failed tests on Linux**: " + branch + " " + commit + " " + "\"" + commit_message + "\"");
github GmodNET / GmodDotNet / node / discord-windows-success.js View on Github external
let webhook = process.argv[2];
let branch = process.argv[3];
let commit = process.argv[4];
let commit_message = process.argv[5];

const whook = require("webhook-discord");

const hook = new whook.Webhook(webhook);

hook.success("Travis CI", "**Build successfully passed tests on Windows**: " + branch + " " + commit + " " + "\"" + commit_message + "\"");
github GmodNET / GmodDotNet / node / discord.js View on Github external
let webhook = process.argv[2];
let branch = process.argv[3];
let commit = process.argv[4];

const whook = require("webhook-discord");

const hook = new whook.Webhook(webhook);

hook.info("Travis CI", "**Successful build**: " + branch + " " + commit + "\n \n Windows: https://gleb-krasilich.fra1.digitaloceanspaces.com/GmodDotNetBuilds/Windows/" + branch + "/" + branch + "-" + commit + ".zip"
            + "\n\n"
            + "Linux: " + "https://gleb-krasilich.fra1.digitaloceanspaces.com/GmodDotNetBuilds/Linux/" + branch + "/" + branch + "-" + commit + ".tar.gz"
            + "\n\n"
            + "Osx: " + "https://gleb-krasilich.fra1.digitaloceanspaces.com/GmodDotNetBuilds/Osx/" + branch + "/" + branch + "-" + commit + ".tar.gz"
            + "\n\n"
            + "Lua client: " + "https://gleb-krasilich.fra1.digitaloceanspaces.com/GmodDotNetBuilds/Lua/" + branch + "/" + commit + "/" + "gm_dotnet_client.lua"
            + "\n\n"
            + "Lua server: " + "https://gleb-krasilich.fra1.digitaloceanspaces.com/GmodDotNetBuilds/Lua/" + branch + "/" + commit + "/" + "gm_dotnet_server.lua");

webhook-discord

A simple Javascript file for nicely formatting Discord webhooks

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis