0.0.8 • Published 4 years ago

disc-images v0.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Setting Up

You'll first need to install disc-images with npm install disc-images.

Once installed, you'll be able to use this versatile image/gif generator.

Next you will need to require disc-images

    const Discord = require('discord.js');
    const client = new Discord.Client();
    //Require disc-images here:
    const images = require('disc-images');

    //Rest of your code

Once you're done with that, you can use any of the image/gif generators. Currently these are the different features we have:

  • Wave
  • Hug
  • Slap
  • Punch
  • Kill
  • Kiss

Example Code

const Discord = require('discord.js');
const client = new Discord.Client();
//Requiring disc-images
const images = require('disc-images');

client.once('ready', () => {
console.log('Ready!');
});

client.on('message', message => {
	if (message.content === '!wave') {
		// How to send a wave GIF
		message.channel.send(images.wave());
	}
    else if (message.content === '!slap') {
        //How to send a slap GIF
        message.channel.send(images.slap());
    }
    else if (message.content === '!kiss') {
        //How to send a kiss GIF
        message.channel.send(images.kiss());
    }
});

client.login('your-token-goes-here');

Using command handler

const images = require('disc-images');
module.exports = {
    name: 'wave'
    description: 'Wave to someone',
    execute(client, message, args) {
        message.channel.send(images.wave());
    }
}
0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago