Nebulous Pumpkin Moons

    cool-image-api-wrapper
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.5 • Public • Published

    Cool Image API Wrapper

    Discord Version Documentation License: GPL-3.0

    What is cool-image-api-wrapper?

    A quick and easy wraper to interact with the cool image api!

    Features

    • 🧑 Beginner friendly
    • 🎉 Easy to use
    • Simple
    • ⚙️ Asynchronous
    • and much more!

    Install 📥

    npm install cool-image-api-wrapper

    Usage 📚

    const { API } = require("cool-image-api-wrapper");
    const api = new API();
    await api
      .discord_message(
        "My, name is Sujal Goel",
        "#7289DA",
        "Sujal Goel",
        "https://cdn.discordapp.com/avatars/581752425858203659/a_b26f9781f3b0300177ab1f3af6190a52.png"
      )
      .then((data) => {
        console.log(data);
      })
      .catch((e) => {
        console.log(e);
      });

    Example ✏️

    const Discord = require("discord.js");
    const client = new Discord.Client();
    const { API } = require("cool-image-api-wrapper");
    const api = new API();
    
    client.on("ready", () => {
      console.log(`Logged in as ${client.user.tag}!`);
    });
    
    client.on("message", async (message) => {
      if (message.content === "test") {
        await api
          .discord_message(
            "My, name is Sujal Goel",
            "#7289DA",
            "Sujal Goel",
            "https://cdn.discordapp.com/avatars/581752425858203659/a_b26f9781f3b0300177ab1f3af6190a52.png"
          )
          .then((data) => {
            console.log(data);
            const attachment = new Discord.MessageAttachment(data);
            message.channel.send(attachment);
          })
          .catch((e) => {
            console.log(e);
          });
      }
    });
    
    client.login("DISCORD_BOT_TOKEN");

    Contributing 🤝

    • Contributions, issues and feature requests are welcome!
    • Feel free to check issues page.

    Author 💖

    Copyright © 2021 Sujal Goel 👤

    Important Links:

    Install

    npm i cool-image-api-wrapper

    DownloadsWeekly Downloads

    6

    Version

    1.0.5

    License

    GPL-3.0

    Unpacked Size

    63 kB

    Total Files

    7

    Last publish

    Collaborators

    • sujalgoel