1.0.2 • Published 4 years ago
something-random v1.0.2
Welcome, this is Something-Random module!
This module can send random images, but it all depends on the function, you are use.
Methods
- randomCat - Sends random image with cat.
- randomDog - Sends random image with dog.
- randomAlpaca - Sends random image with alpaca.
- randomLlama - Sends random image with llama.
- randomJoke - Sends random text with image from Reddit.
- randomMeme - Sends random meme from Reddit.
- randomSeal - Sends random image with seal.
- 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