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 |
|
6 | An 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 | ```
|
12 | npm i noodles-wrapper
|
13 | ```
|
14 |
|
15 | ## Examples
|
16 | ### Random memes command, no input example
|
17 | ```js
|
18 | const noodles_api = require('noodles-wrapper')
|
19 | const Discord = require('discord.js')
|
20 |
|
21 | const Image = await noodles_api.randommeme()
|
22 | let embed = new Discord.MessageEmbed()
|
23 | .attachFiles([{name: "meme.png", attachment:Image}])
|
24 | .setImage('attachment://meme.png')
|
25 | message.channel.send(embed)
|
26 | ```
|
27 |
|
28 | ### Lisa-Stage command, 1 text input example
|
29 | ```js
|
30 | const noodles_api = require('noodles-wrapper')
|
31 | const Discord = require('discord.js')
|
32 |
|
33 | let text = args.toString().replace(/,/g, ' ')
|
34 | let Image = await noodles_api.lisastage(text)
|
35 |
|
36 | const attachment = new Discord.MessageAttachment(Image);
|
37 | message.channel.send(attachment);
|
38 | ```
|
39 |
|
40 | ### Drake command, more than one text input example
|
41 | ```js
|
42 | const noodles_api = require('noodles-wrapper');
|
43 |
|
44 | let text1 = args.toString().split('/')[0].replace(/,/g, ' ')
|
45 | let text2 = args.toString().split('/')[1].replace(/,/g, ' ')
|
46 |
|
47 | let Image = await noodles_api.drake(text1, text2)
|
48 | const attachment = new Discord.MessageAttachment(Image);
|
49 |
|
50 | message.channel.send(attachment);
|
51 | ```
|
52 |
|
53 | ### Trash command, image input example
|
54 | ```js
|
55 | let Discord = require("discord.js");
|
56 | const noodles_api = require('noodles-wrapper')
|
57 |
|
58 | let user = message.mentions.users.first() || message.author
|
59 | let result = user.displayAvatarURL()
|
60 |
|
61 | let Image = await noodles_api.trash(result)
|
62 |
|
63 | const attachment = new Discord.MessageAttachment(Image);
|
64 | message.channel.send(attachment);
|
65 | ```
|
66 |
|
67 | ### Balance card command, for more than 2 inputs example
|
68 | ```js
|
69 | let 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 |
|
79 | let 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')
|
85 | message.channel.send(embed)
|
86 | ```
|
87 |
|
88 | ### Welcome banner
|
89 | As for the welcome banner, it the same code as balance card, just remove text1 replace text2 with subtitle, aka setSubtitle
|
90 |
|
91 | ## Endpoints
|
92 | You can get a full list of the possible API endpoints [Here](https://frenchnoodles.xyz/api/endpoints)
|
93 | But 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 |
|
117 | just replace the inputs with whatever you want,
|
118 | balancecard and welcomebanner are missing cuz they arent implemented in the API yet
|
119 |
|
120 | ## Made by
|
121 | Made 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
|
124 | I will be adding the more complicated balance card and welcome endpoints
|
125 |
|
126 | Plus the wrapper is made in a way so that in Visual Studio Code you will get autocomplete for the function names!
|
127 |
|
128 |
|