multipurpose-discord-package
v0.1.5
Published
A package for multipurpose use and will help you make your Discord bot better!
Downloads
17
Maintainers
Readme
A package that is helpful in bot making! Make commands easily using this package.
Reasons to use this package:
- It will work with any version and is customizable! The methods return only the data, and how to use that data is depended upon you! The package is frequently updated.
Example code
const Discord = require("discord.js");
const client = new Discord.Client();
const { Something } = require("multipurpose-discord-package");
const something = new Something();
client.on("ready", () => {
console.log(`Ready! Logged in as ${client.user.tag}!`)
});
client.on("message", async message => {
if (message.content.startsWith("!neko")) {
let neko = await something.fetchNeko();
let embed = new Discord.MessageEmbed()
.setTitle("Neko!")
.setImage(neko)
.setColor("RANDOM")
message.channel.send(embed)
} else if (message.content.startsWith("!meme")) {
let meme = await something.fetchMeme();
let embed = new Discord.MessageEmbed()
.setTitle(meme.title)
.setImage(meme.image)
.setColor("RANDOM")
message.channel.send(embed);
}
});
client.login("Your Token Here");
Constructor options.
const { Something } = require("multipurpose-discord-package")
const something = new Something({ sendAsEmbed: true, embedColor: 0x00ff00 })
- sendAsEmbed: will make the package send the data using a pre-made embed, just use a method and send it directly, it will be an embed! It is preferred to keep this option off and to use manually made embeds are you can't add anything in the pre-made embeds.
- embedColor: sets the color of your embed to provided hex code. If left empty it will choose a random color. Can only be used when sendAsEmbed is enabled.
Fetching methods.
fetchAdvice(): Returns random advice.
let data = await something.fetchAdvice() // "Respect your elders."
message.channel.send(data)
fetchJoke(): Returns random joke. Returns data.setup (Setup of the joke) and data.punchline (Punchline of the joke).
let data = await something.fetchJoke() // {setup: "Why did the invisible man turn down the job offer?", punchline: "He couldn't see himself doing it"}
message.channel.send(`${data.setup}\n${data.punchline}`)
fetchLyrics(song): Returns lyrics of provided song.
let data = await something.fetchLyrics("Perfect") // "I found a love for me\nOh darling ... You look perfect tonight"
message.channel.send(data)
fetchMeme(): Returns random meme. Returns data.title (meme title) and data.image (meme image).
let data = await something.fetchMeme() // {title: "me_irl", image: "https://i.redd.it/9pi03fh30wt61.png"}
message.channel.send(`${data.title}\n${data.image}`)
fetchQuote(): Returns random quote.
let data = await something.fetchQuote() // "We are what we think. All that we are arises with our thoughts. With our thoughts, we make the world."
message.channel.send(data)
fetchNeko(): Returns random neko image.
let data = await something.fetchNeko() // ""https://neko-love.xyz/v1/neko/neko-love_395.jpg"
message.channel.send(data)
fetchNekoGif(): Returns random neko gif.
let data = await something.fetchNekoGif() // "https://cdn.nekos.life/ngif/neko_026.gif"
message.channel.send(data)
fetchWaifu(): Returns random waifu image.
let data = await something.fetchWaifu() // "https://i.waifu.pics/i1QE8~W.com_0265.jpg"
message.channel.send(data)
fetchDogFact(): Returns random dog fact.
let data = await something.fetchDogFact() // "Puppies are born without teeth and eyesight. They're also born deaf."
message.channel.send(data)
fetchCatFact(): Returns random cat fact.
let data = await something.fetchCatFact() // "Cats only sweat through their foot pads."
message.channel.send(data)
fetchBirdFact(): Returns random bird fact.
let data = await something.fetchBirdFact() // "Flamingos pair for a lifetime. Some stay with their mates for 50 years or more."
message.channel.send(data)
fetchFoxFact(): Returns random fox fact.
let data = await something.fetchFoxFact() // "Foxes dig underground dens where they take care of their kits and hide from predators"
message.channel.send(data)
fetchKoalaFact(): Returns random koala fact.
let data = await something.fetchKoalaFact() // "These magnificent mammals get their name form an Aborigina…oisture from the leaves they eat, and rarely drink water."
message.channel.send(data)
fetchPandaFact(): Returns random panda fact.
let data = await something.fetchPandaFact() // "After 1 month the cub is 1 cm. long."
message.channel.send(data)
fetchRawMCSkin(name): Returns minecraft skin texture of provided username. You can download the image and select it as your own skin.
let data = await something.fetchRawMCSkin("Technoblade") // "http://textures.minecraft.net/texture/786c039d969d1839155255e38e7b06a626ea9f8baf9cb55e0a77311efe18a3e"
message.channel.send(data)
fetchMCSkin(name): Returns minecraft skin of provided username.
let data = await something.fetchRawMCSkin("Technoblade") // https://minotar.net/body/Technoblade/100.png
message.channel.send(data)
fetchMCNameHistory(name): Returns minecraft skin of provided username.
let data = await something.fetchRawMCSkin("some name here") // ["first name", "second name", "third name", "and so on"]
message.channel.send(data)
Text-manipulation methods.
owoify(text): Returns owoified text.
let data = await something.owoify("hello friends!") // "hewwo fwienyds UwU"
message.channel.send(data)
emojify(text): Returns emojified text.
let data = await something.emojify("something to emojify.") // " :regional_indicator_s: :regional_indicator_o: :regional_i … dicator_i: :regional_indicator_f: :regional_indicator_y:."
message.channel.send(data)
reverse(text): Returns reversed text.
let data = await something.reverse("this will be reversed.") // ".desrever eb lliw siht"
message.channel.send(data)
shuffle(text): Returns shuffled text.
let data = await something.shuffle("some shuffled text.") // " t.osefshxtdf eluem"
message.channel.send(data)
textToBinary(text): Returns provided text into binary.
let data = await something.textToBinary("binary test") // "1100010 1101001 1101110 1100001 1110010 1111001 100000 1110100 1100101 1110011 1110100"
message.channel.send(data)
binaryToText(binary): Returns provided binary into text.
let data = await something.binaryToText("1100010 1101001 1101110 1100001 1110010 1111001 100000 1110100 1100101 1110011 1110100") // "binary test"
message.channel.send(data)
ascii(text): Returns provided text into ascii.
let data = await something.ascii("e") // "___/ _ \| __/\___|" (will be formatted when used)
message.channel.send(data)
piglatin(text): Returns provided text into piglatin.
let data = await something.piglatin("this is piglatin text") // "is-thay is-way iglatin-pay ext-tay"
message.channel.send(data)
pirateSpeak(text): Returns provided text into pirate speak.
let data = await something.pirateSpeak("this is some pirate text my friend") // "'tis some pirate text me bucko"
message.channel.send(data)
yodaSpeak(text): Returns provided text into yoda speak.
let data = await something.yodaSpeak("I am speaking like yoda!") // "Speaking like yoda!, I am."
message.channel.send(data)
NSFW methods (Anime only).
fetchNSFWNeko(): Returns random nsfw neko image.
let data = await something.fetchNSFWNeko() // "https://cdn.nekos.life/lewd/lewd_neko***.jpg"
message.channel.send(data)
fetchNSFWNekoGif(): Returns random nsfw neko gif.
let data = await something.fetchNSFWNekoGif() // "https://cdn.nekos.life/nsfw_neko_gif/hneko**.gif"
message.channel.send(data)
fetchNSFWWaifu(): Returns random nsfw waifu image.
let data = await something.fetchNSFWWaifu() // "https://i.waifu.pics/jjc***d.png"
message.channel.send(data)
fetchHentaiGif(): Returns random hentai gif.
let data = await something.fetchHentaiGif() // "https://cdn.nekos.life/Random_hentai_gif/Random_hentai_gif**_*227.gif"
message.channel.send(data)
fetchLesbianGif(): Returns random lesbian gif.
let data = await something.fetchLesbianGif() // "https://cdn.nekos.life/les/On****54.gif"
message.channel.send(data)
fetchBoobsGif(): Returns random boobs gif.
let data = await something.fetchBoobsGif() // "https://cdn.nekos.life/bo**s/boob***87.gif"
message.channel.send(data)
fetchTits(): Returns random tits image.
let data = await something.fetchTits() // "https://cdn.nekos.life/tits/ti***6.jpg"
message.channel.send(data)
fetchNSFWAvatar(): Returns random nsfw avatar.
let data = await something.fetchNSFWAvatar() // "https://cdn.nekos.life/nsfw_avatar/ero_****ar_7.png"
message.channel.send(data)
Note:
- If you are facing any type of bugs with any of the methods, report it here.