alexflipnote.js
TypeScript icon, indicating that this package has built-in type declarations

3.1.2 • Public • Published

alexflipnote.js npm npm install size

A simple AlexFlipnote API Wrapper

NPM

Installation

npm i alexflipnote.js

Recent Updates

Good news: AlexFlipnote has returned some of the endpoints back and this module has been updated accordingly Screenshot

Endpoints

Function Params Description
achievement() text, icon (optional) Sends a Minecraft achievement image
birb() none Sends a random birb image
calling() text Sends a Tom calling image
captcha() text Sends a Google captcha image
cats() none Sends a random cat image
challenge() text, icon (optional) Sends a Minecraft challenge image
color() string Searches a color from hex code and provide more info
didyoumean?() top, bottom Sends a "Did you mean" Google image
dogs() none Sends a random dog image
drake() top, bottom Sends a Drake yes no image
facts() text Sends a facts book image
nft() seed (optional) or hex, season (optional) Sends a randomised (or customised) xelA avatar/nft
ph() text, text2 Sends a pornhub logo format image
sadcat() none Sends a random sad cat image
scroll() text Sends a scroll of truth image
sillycat() seed (optional) or hex, hex2 (optional) Sends a silly cat image
coffee() none Sends a random Coffee image

birb/cats/dogs/sadcat/coffee will return {file: "https://api.alexflipnote.dev/cats/zDm8l4maVQg_cats.png"}

color example return: Color

nft without parameters or only seed parameter example return: NFT

sillycat without parameters or only seed parameter example return: Sillycat

Other methods not listed above will return an image buffer.

Typings

I added a typings file and will be working to perfect it. This allows editors like VSC to use intellisense/autocomplete to suggest functions and help out with parameters and to see what you'll be receiving as a result of function calls.

Examples

Cats Example

const client = require('alexflipnote.js');
const alexClient = new client();
const fs = require('fs');
const https = require('https');

(async () => {
  const link = await alexClient.cats();
  const file = fs.createWriteStream("image.png");
  https.get(link.file, function(response) {
     response.pipe(file);
     file.on("finish", () => {
         file.close();
     });
  });
})();

NFT and Sillycat Example

const client = require('alexflipnote.js');
const alexClient = new client();
const fs = require('fs');
const https = require('https');

(async () => {
  const image = await alexClient.sillycat();
  const file = fs.createWriteStream("image.png");
  https.get(image.images.simple, function(response) {
     response.pipe(file);
     file.on("finish", () => {
         file.close();
     });
  });
})();

Color Example

const client = require('alexflipnote.js');
const alexClient = new client();
let body = await alexClient.color('00ffd9');
console.log(body);

Utilisation of Buffers in Embeds in Discord.js v14 Example

const { AttachmentBuilder, EmbedBuilder } = require('discord.js');
const client = require('alexflipnote.js');
const alexClient = new client();

let buffer = alexClient.challenge({"balls", 1});
let file = new AttachmentBuilder(buffer, { name: 'image.png' });

const embed = new EmbedBuilder()
	.setTitle('Nice Image')
	.setImage('attachment://image.png');

channel.send({ embeds: [embed], files: [file] });

Made By

This wrapper is made by HarutoHiroki#4000 on Discord.

For questions and bug reports you can join my Discord server or AlexFlipnote's server

Suggestions are welcomed!

Package Sidebar

Install

npm i alexflipnote.js

Weekly Downloads

54

Version

3.1.2

License

MIT

Unpacked Size

13.7 kB

Total Files

6

Last publish

Collaborators

  • harutohiroki