Package Exports
- cool-image-api-wrapper
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cool-image-api-wrapper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Cool Image API Wrapper
What is cool-image-api-wrapper?
A quick and easy wraper to interact with the cool image api!
Features
- 🧑 Beginner friendly
- 🎉 Easy to use
- ✨ Simple
- ⚙️ Asynchronous
- and much more!
Install 📥
npm install cool-image-api-wrapperUsage 📚
const { API } = require("cool-image-api-wrapper");
const api = new API();
await api
.discord_message(
"My, name is Sujal Goel",
"#7289DA",
"Sujal Goel",
"https://cdn.discordapp.com/avatars/581752425858203659/a_b26f9781f3b0300177ab1f3af6190a52.png"
)
.then((data) => {
console.log(data);
})
.catch((e) => {
console.log(e);
});Example ✏️
const Discord = require("discord.js");
const client = new Discord.Client();
const { API } = require("cool-image-api-wrapper");
const api = new API();
client.on("ready", () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on("message", async (message) => {
if (message.content === "test") {
await api
.discord_message(
"My, name is Sujal Goel",
"#7289DA",
"Sujal Goel",
"https://cdn.discordapp.com/avatars/581752425858203659/a_b26f9781f3b0300177ab1f3af6190a52.png"
)
.then((data) => {
console.log(data);
const attachment = new Discord.MessageAttachment(data);
message.channel.send(attachment);
})
.catch((e) => {
console.log(e);
});
}
});
client.login("DISCORD_BOT_TOKEN");Contributing 🤝
- Contributions, issues and feature requests are welcome!
- Feel free to check issues page.
Author 💖
Copyright © 2021 Sujal Goel 👤
- Github: @Sujal Goel
- Website: @Sujal Goel