# discord-image

> An image api for discord.

Latest version **1.5.0** (published 2020-10-17) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install discord-image
pnpm add discord-image
yarn add discord-image
bun add discord-image
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.5.0 |
| Published | 2020-10-17 |
| First published | 2020-10-06 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 14.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Yuu#0007 |
| Maintainers | yuu0007, karlson, bananamaster69 |

## Links

- npm: https://www.npmjs.com/package/discord-image
- Repository: https://github.com/yuu0007/discord-image
- Homepage: https://github.com/yuu0007/discord-image#readme
- Issues: https://github.com/yuu0007/discord-image/issues
- npm.io page: https://npm.io/package/discord-image

## Dependencies (1)

- [node-superfetch](https://npm.io/package/node-superfetch.md) ^0.1.10

## Recent versions

- 1.5.0 (latest) — 2020-10-17
- 1.4.7 — 2020-10-07
- 1.4.6 — 2020-10-07
- 1.4.5 — 2020-10-07
- 1.4.0 — 2020-10-06
- 1.3.0 — 2020-10-06
- 1.2.1 — 2020-10-06
- 1.2.0 — 2020-10-06
- 1.1.2 — 2020-10-06
- 1.1.1 — 2020-10-06
- 1.1.0 — 2020-10-06
- 1.0.2 — 2020-10-06
- 1.0.1 — 2020-10-06
- 1.0.0 — 2020-10-06

## README

# discord-image
![forthebadge](https://img.shields.io/github/stars/yuu0007/discord-image?style=for-the-badge) ![forthebadge](https://img.shields.io/github/issues/yuu0007/discord-image?style=for-the-badge) [![Support Server](https://img.shields.io/discord/591914197219016707.svg?label=Discord&logo=Discord&colorB=7289da&style=for-the-badge)](https://discord.gg/A3Cnsxx)

[![NPM](https://nodei.co/npm/discord-image.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/discord-image/)

An image generation wrapper for Discord or any kind!

# Installing
```npm install discord-image```

# Examples
- Discord.js example (v12)
```js
// import the dependencies
const Discord = require('discord.js');
const { ImageGen, TextGen } = require('discord-image');

const Text = new TextGen();
const Image = new ImageGen();
const client = new Discord.Client();

// message event
client.on('message', async message => {
	if (message.content.startsWith('!cat')) {
		const cat = await Image.cat();
		message.channel.send(cat);
	} else if (message.content.startsWith('!fact')) {
		const fact = await Text.fact();
		message.channel.send(fact);
	} else if (message.content.startsWith('!clyde')) {
		// replace content with the message you want to clydify
		const clyde = await Image.clyde(content);
		message.channel.send(clyde);
	}
});

// login to the discord
client.login('your_token_goes_here');
```
- CommonJS example
```js
async function cat() {
	const image = await Image.cat();
	console.log(image);
}

cat();
```

# Available Endpoints
- cat
- dog
- fact
- clyde
- bird

---
_Source: https://npm.io/package/discord-image · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
