New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nonimageapi

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nonimageapi - npm Package Compare versions

Comparing version 1.0.1-beta.2 to 1.0.1

8

examples/test.js

@@ -1,6 +0,6 @@

const images = require("../index.js");
const nonimageapi = require("../index.js");
const images = new nonimageapi();
let test = images.fakemsg("bomdia", "nome-legal", null, true);
console.log(test);
let json = images.memes(true)
console.log(json)
let json = images.memes(true);
console.log(json);
const fetch = require('node-fetch');
let url = "https://nonimageapi.apenasigor.repl.co/api/v1/";
module.exports.fakemsg = (msg, username, avatar, bot) => {
class Image {
constructor(Image) {
this.ImageApi = Image;
}
fakemsg(msg, username, avatar, bot) {
if(!bot) bot = false; // Retorna falso caso usuário não coloque "bot"

@@ -11,4 +15,4 @@ if(!username) username="User"; // Caso usuário não colocar nome

return url + `fake-message?avatar=${avatar}&username=${username}&text=${msg}&bot=${bot}`; // Retorna link da mensagem
};
module.exports.memes = (json) => {
}
async memes(json) {
if(json) {

@@ -19,2 +23,11 @@ fetch(url + `memes?json=true`).then(res => res.json()).then(data => {

} else return url + `memes`;
};
};
async cats(json) {
if(json) {
fetch(url + `cats?json=true`).then(res => res.json()).then(data => {
return data;
});
} else return url + `cats`;
};
}
module.exports = Image;
{
"name": "nonimageapi",
"version": "1.0.1-beta.2",
"version": "1.0.1",
"description": "An image api for you to have fun",

@@ -13,9 +13,11 @@ "main": "index.js",

"keywords": [
"api"
"api",
"discord",
"images"
],
"author": "Igor, ImmaUgc, M.Experimental",
"license": "ISC",
"dependencies": {
"dev-dependencies": {
"node-fetch": "^2.6.1"
}
}

@@ -1,4 +0,29 @@

# NonImageApi
# NonImageApi (Beta)
- An api for your Discord bot, for FREE!
# How to use?
```
const NonImageApi = require('nonimageapi');
const images = new NonImageApi();
images.memes() // Set json to true or false (Optional)
images.cats() // Set json to true or false (Optional)
```
-----
# All functions
`memes(<Json>)` - Take meme from a reddit and turn it into an image (Json optional).
`cats(<Json>)` - Take pictures of cats from reddit [Cats](https://www.reddit.com/r/cats) (Json optional).
`fakemsg(<message>, <username>, <avatar>, <bot>)` - Creates a fake Discord message / Direct from our api website (Bot optional)
# Coming Soon
- More functions for our API
# Thanks to contributors
<center>
[M. Experimental](https://twitter.com/m_experimental?s=09)
[ImmaUGC](https://github.com/ImmaUgc)
[ApenasIgorDev](https://github.com/apenasigordev)
</center>
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc