1.0.2 • Published 4 years ago

something-random v1.0.2

Weekly downloads
11
License
ISC
Repository
github
Last release
4 years ago

Welcome, this is Something-Random module!

This module can send random images, but it all depends on the function, you are use.

Methods

  1. randomCat - Sends random image with cat.
  2. randomDog - Sends random image with dog.
  3. randomAlpaca - Sends random image with alpaca.
  4. randomLlama - Sends random image with llama.
  5. randomJoke - Sends random text with image from Reddit.
  6. randomMeme - Sends random meme from Reddit.
  7. randomSeal - Sends random image with seal.
  8. randomNumber - Sends random number.

Example

index.js file:

const { Client } = require('discord.js');
const something = require('something-random');
const somethingRandom = new something({
    type: 'embed' // It can be: message, embed or url(for embed)
});

const client = new Client();
client.login('TOKEN'); // https://discord.com/developers/applications
client.once('ready', () => console.log('Working'));

client.on('message', async(message) => {
    if(message.content.startsWith('k!cat')) {
        return await somethingRandom.randomCat(message);
    }else if(message.content.startsWith('k!dog')) {
        return await somethingRandom.randomDog(message);
    }else if(message.content.startsWith('k!alpaca')) {
        return await somethingRandom.randomAlpaca(message);
    }else if(message.content.startsWith('k!llama')) {
        return await somethingRandom.randomLlama(message);
    }else if(message.content.startsWith('k!meme')) {
        return await somethingRandom.randomMeme(message);
    }else if(message.content.startsWith('k!joke')) {
        return await somethingRandom.randomJoke(message);
    }else if(message.content.startsWith('k!seal')) {
        return await somethingRandom.randomSeal(message);
    }else if(message.content.startsWith('k!randomnumber')) {
        return message.channel.send(somethingRandom.randomNumber(1, 90));
    }
})

Contributing

If you want, to contribute with me, DM me on Discord: bad boy#1046

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago