Novelty Palliates Malaise

    genimage

    1.0.1 • Public • Published

    Discord-Images is a npm to make image generation easier!

    To install this npm just do:

    npm i genimage

    Examples

    Discord.JS

    const Discord = require('discord.js'); //npm i discord.js
    const client = new Discord.Client(); //making the discord.js client
    const discordImageGen = require("genimage");
    
    client.on('ready', () => console.log("Ready!"));
    client.on("message", async message => {
       const prefix = "!"; //feel free to change this.
       if(message.author.bot || message.channel.type === "dm" || !message.content.startsWith(prefix)) return;
       if (message.content === prefix + "communism") {
           const user = message.mentions.users.first() || message.author;
          const image = await discordImageGen.communism(user.displayAvatarURL({ dynamic: false, format: "png" }));
          const img = new Discord.MessageAttachment(image, "communism.png")
          message.channel.send(img)
       };
    });
    client.login("super_secret_bot.token") // Your bot's token from the developer portal

    Express WebServer

    Need Support?

    Join our support server

    Keywords

    none

    Install

    npm i genimage

    DownloadsWeekly Downloads

    5

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    11.1 kB

    Total Files

    8

    Last publish

    Collaborators

    • danplayz0