UNPKG

4.19 kBMarkdownView Raw
1
2# Noodles wrapper [![npm](https://img.shields.io/npm/v/noodles-wrapper.svg)](https://www.npmjs.com/package/noodles-wrapper) [![npm](https://img.shields.io/npm/dt/noodles-wrapper.svg?maxAge=3600)](https://www.npmjs.com/package/noodles-wrapper) [![install size](https://packagephobia.now.sh/badge?p=noodles-wrapper)](https://packagephobia.now.sh/result?p=noodles-wrapper)
3
4
5
6An API wrapper for [Noodles API](https://frenchnoodles.xyz/api) made by French Noodles#6046 to make your life easier while using the noodles API
7 [![NPM](https://nodei.co/npm/noodles-wrapper.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/alexflipnote.js/)
8
9
10## Installation
11```
12npm i noodles-wrapper
13```
14
15## Examples
16### Random memes command, no input example
17```js
18const noodles_api = require('noodles-wrapper')
19const Discord = require('discord.js')
20
21const Image = await noodles_api.randommeme()
22let embed = new Discord.MessageEmbed()
23 .attachFiles([{name: "meme.png", attachment:Image}])
24 .setImage('attachment://meme.png')
25message.channel.send(embed)
26```
27
28### Lisa-Stage command, 1 text input example
29```js
30const noodles_api = require('noodles-wrapper')
31const Discord = require('discord.js')
32
33let text = args.toString().replace(/,/g, ' ')
34let Image = await noodles_api.lisastage(text)
35
36const attachment = new Discord.MessageAttachment(Image);
37message.channel.send(attachment);
38```
39
40### Drake command, more than one text input example
41```js
42const noodles_api = require('noodles-wrapper');
43
44let text1 = args.toString().split('/')[0].replace(/,/g, ' ')
45let text2 = args.toString().split('/')[1].replace(/,/g, ' ')
46
47let Image = await noodles_api.drake(text1, text2)
48const attachment = new Discord.MessageAttachment(Image);
49
50message.channel.send(attachment);
51```
52
53### Trash command, image input example
54```js
55let Discord = require("discord.js");
56const noodles_api = require('noodles-wrapper')
57
58let user = message.mentions.users.first() || message.author
59let result = user.displayAvatarURL()
60
61let Image = await noodles_api.trash(result)
62
63const attachment = new Discord.MessageAttachment(Image);
64message.channel.send(attachment);
65```
66
67### Balance card command, for more than 2 inputs example
68```js
69let Image = await new noodles_api.balancecard() //You first make the variable
70.setBackground(background) //then set all the arguments like so
71.setAvatar(avatar)
72.setTitle(title)
73.setText1(text1)
74.setText2(text2)
75.setTextColor(textcolor)
76.build() //and when your done, .build() it
77
78
79let embed= new Discord.MessageEmbed()
80 embed.setTitle(`Here is your balance ${message.author.username}!!`)
81 embed.attachFiles([{name: "balance.png", attachment:Image}])
82 embed.setImage('attachment://balance.png');
83 embed.setColor(process.env.EMBEDCOLOR)
84 embed.setFooter('Using Noodles API')
85message.channel.send(embed)
86```
87
88### Welcome banner
89As for the welcome banner, it the same code as balance card, just remove text1 replace text2 with subtitle, aka setSubtitle
90
91## Endpoints
92You can get a full list of the possible API endpoints [Here](https://frenchnoodles.xyz/api/endpoints)
93But here are the functions:
94
95 - `drake(text1 ,text2)`
96 - `worthless(text)`
97 - `presidentialalert(text)`
98 - `spongebobburnpaper(text)`
99 - `lisastage(text)`
100 - `changemymind(text)`
101 - `awkwardmonkey(text)`
102 - `blur(image)`
103 - `invert(image)`
104 - `edges(image)`
105 - `circle(image)`
106 - `wide(image)`
107 - `uglyupclose(image)`
108 - `clown(image)`
109 - `rip(image)`
110 - `affectbaby(image)`
111 - `trash(image)`
112 - `welcomebanner() (set stuff like the example)`
113 - `boostercard(image)`
114 - `randommeme()`
115 - `balancecard() (set stuff like the example)`
116
117just replace the inputs with whatever you want,
118balancecard and welcomebanner are missing cuz they arent implemented in the API yet
119
120## Made by
121Made with ❤ by French Noodles#6046, you can checkout my website [Here](https://frenchnoodles.xyz) or join my discord server [Here!](https://frenchnoodles.xyz/discord) if you have any questions or suggestions or bug reports
122
123## Notes
124I will be adding the more complicated balance card and welcome endpoints
125
126Plus the wrapper is made in a way so that in Visual Studio Code you will get autocomplete for the function names!
127
128