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-wrapper
Usage 📚
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 💖
Support Server