@elara-services/packages 5.3.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/package.json +44 -0
  2. package/dist/src/index.d.ts +1 -0
  3. package/dist/src/index.js +17 -0
  4. package/dist/src/interfaces/discord.d.ts +91 -0
  5. package/dist/src/interfaces/discord.js +2 -0
  6. package/dist/src/interfaces/index.d.ts +1 -0
  7. package/dist/src/interfaces/index.js +17 -0
  8. package/dist/src/lib/AES.d.ts +7 -0
  9. package/dist/src/lib/AES.js +71 -0
  10. package/dist/src/lib/discord.d.ts +136 -0
  11. package/dist/src/lib/discord.js +336 -0
  12. package/dist/src/lib/index.d.ts +8 -0
  13. package/dist/src/lib/index.js +24 -0
  14. package/dist/src/lib/languages.d.ts +110 -0
  15. package/{packages → dist/src/lib}/languages.js +123 -119
  16. package/dist/src/lib/minesweeper.d.ts +20 -0
  17. package/{packages → dist/src/lib}/minesweeper.js +67 -77
  18. package/dist/src/lib/misc.d.ts +1 -0
  19. package/dist/src/lib/misc.js +72 -0
  20. package/dist/src/lib/random.d.ts +16 -0
  21. package/dist/src/lib/random.js +326 -0
  22. package/dist/src/lib/tasks.d.ts +9 -0
  23. package/dist/src/lib/tasks.js +68 -0
  24. package/docs/.nojekyll +1 -0
  25. package/docs/assets/highlight.css +22 -0
  26. package/docs/assets/main.js +58 -0
  27. package/docs/assets/search.js +1 -0
  28. package/docs/assets/style.css +1367 -0
  29. package/docs/classes/AES.html +145 -0
  30. package/docs/classes/Minesweeper.html +206 -0
  31. package/docs/classes/Tasks.html +142 -0
  32. package/docs/functions/fetch.html +90 -0
  33. package/docs/functions/find.html +75 -0
  34. package/docs/functions/randomWeight.html +80 -0
  35. package/docs/functions/randomWords.html +75 -0
  36. package/docs/index.html +164 -0
  37. package/docs/interfaces/ButtonOptions.html +155 -0
  38. package/docs/interfaces/ModalOptions.html +125 -0
  39. package/docs/interfaces/RandomWord.html +154 -0
  40. package/docs/interfaces/SelectOptions.html +160 -0
  41. package/docs/interfaces/Slash.html +139 -0
  42. package/docs/interfaces/SlashOptions.html +188 -0
  43. package/docs/interfaces/TaskCreate.html +104 -0
  44. package/docs/interfaces/TextInputOptions.html +181 -0
  45. package/docs/modules.html +103 -0
  46. package/docs/types/ButtonNumberStyles.html +66 -0
  47. package/docs/types/ButtonStyles.html +66 -0
  48. package/docs/types/ChannelTypes.html +66 -0
  49. package/docs/types/Lang.html +66 -0
  50. package/docs/types/LangName.html +66 -0
  51. package/docs/variables/ButtonStyle.html +89 -0
  52. package/docs/variables/Duration.html +110 -0
  53. package/docs/variables/Interactions.html +160 -0
  54. package/docs/variables/SlashBuilder.html +239 -0
  55. package/docs/variables/langs.html +279 -0
  56. package/package.json +44 -10
  57. package/.github/renovate.json +0 -5
  58. package/CHANGELOG +0 -62
  59. package/index.d.ts +0 -247
  60. package/index.js +0 -11
  61. package/packages/Interactions.js +0 -76
  62. package/packages/SlashBuilder.js +0 -58
  63. package/packages/Tasks.js +0 -22
  64. package/packages/aes256.js +0 -62
  65. package/packages/duration.js +0 -74
  66. package/packages/fetch.js +0 -27
  67. package/packages/random/weight.js +0 -8
  68. package/packages/random/words.js +0 -300
@@ -1,300 +0,0 @@
1
- let wordList = [
2
- "ability","able","aboard","about","above","accept","accident","according",
3
- "account","accurate","acres","across","act","action","active","activity",
4
- "actual","actually","add","addition","additional","adjective","adult","adventure",
5
- "advice","affect","afraid","after","afternoon","again","against","age",
6
- "ago","agree","ahead","aid","air","airplane","alike","alive",
7
- "all","allow","almost","alone","along","aloud","alphabet","already",
8
- "also","although","am","among","amount","ancient","angle","angry",
9
- "animal","announced","another","answer","ants","any","anybody","anyone",
10
- "anything","anyway","anywhere","apart","apartment","appearance","apple","applied",
11
- "appropriate","are","area","arm","army","around","arrange","arrangement",
12
- "arrive","arrow","art","article","as","aside","ask","asleep",
13
- "at","ate","atmosphere","atom","atomic","attached","attack","attempt",
14
- "attention","audience","author","automobile","available","average","avoid","aware",
15
- "away","baby","back","bad","badly","bag","balance","ball",
16
- "balloon","band","bank","bar","bare","bark","barn","base",
17
- "baseball","basic","basis","basket","bat","battle","be","bean",
18
- "bear","beat","beautiful","beauty","became","because","become","becoming",
19
- "bee","been","before","began","beginning","begun","behavior","behind",
20
- "being","believed","bell","belong","below","belt","bend","beneath",
21
- "bent","beside","best","bet","better","between","beyond","bicycle",
22
- "bigger","biggest","bill","birds","birth","birthday","bit","bite",
23
- "black","blank","blanket","blew","blind","block","blood","blow",
24
- "blue","board","boat","body","bone","book","border","born",
25
- "both","bottle","bottom","bound","bow","bowl","box","boy",
26
- "brain","branch","brass","brave","bread","break","breakfast","breath",
27
- "breathe","breathing","breeze","brick","bridge","brief","bright","bring",
28
- "broad","broke","broken","brother","brought","brown","brush","buffalo",
29
- "build","building","built","buried","burn","burst","bus","bush",
30
- "business","busy","but","butter","buy","by","cabin","cage",
31
- "cake","call","calm","came","camera","camp","can","canal",
32
- "cannot","cap","capital","captain","captured","car","carbon","card",
33
- "care","careful","carefully","carried","carry","case","cast","castle",
34
- "cat","catch","cattle","caught","cause","cave","cell","cent",
35
- "center","central","century","certain","certainly","chain","chair","chamber",
36
- "chance","change","changing","chapter","character","characteristic","charge","chart",
37
- "check","cheese","chemical","chest","chicken","chief","child","children",
38
- "choice","choose","chose","chosen","church","circle","circus","citizen",
39
- "city","class","classroom","claws","clay","clean","clear","clearly",
40
- "climate","climb","clock","close","closely","closer","cloth","clothes",
41
- "clothing","cloud","club","coach","coal","coast","coat","coffee",
42
- "cold","collect","college","colony","color","column","combination","combine",
43
- "come","comfortable","coming","command","common","community","company","compare",
44
- "compass","complete","completely","complex","composed","composition","compound","concerned",
45
- "condition","congress","connected","consider","consist","consonant","constantly","construction",
46
- "contain","continent","continued","contrast","control","conversation","cook","cookies",
47
- "cool","copper","copy","corn","corner","correct","correctly","cost",
48
- "cotton","could","count","country","couple","courage","course","court",
49
- "cover","cow","cowboy","crack","cream","create","creature","crew",
50
- "crop","cross","crowd","cry","cup","curious","current","curve",
51
- "customs","cut","cutting","daily","damage","dance","danger","dangerous",
52
- "dark","darkness","date","daughter","dawn","day","dead","deal",
53
- "dear","death","decide","declared","deep","deeply","deer","definition",
54
- "degree","depend","depth","describe","desert","design","desk","detail",
55
- "determine","develop","development","diagram","diameter","did","die","differ",
56
- "difference","different","difficult","difficulty","dig","dinner","direct","direction",
57
- "directly","dirt","dirty","disappear","discover","discovery","discuss","discussion",
58
- "disease","dish","distance","distant","divide","division","do","doctor",
59
- "does","dog","doing","doll","dollar","done","donkey","door",
60
- "dot","double","doubt","down","dozen","draw","drawn","dream",
61
- "dress","drew","dried","drink","drive","driven","driver","driving",
62
- "drop","dropped","drove","dry","duck","due","dug","dull",
63
- "during","dust","duty","each","eager","ear","earlier","early",
64
- "earn","earth","easier","easily","east","easy","eat","eaten",
65
- "edge","education","effect","effort","egg","eight","either","electric",
66
- "electricity","element","elephant","eleven","else","empty","end","enemy",
67
- "energy","engine","engineer","enjoy","enough","enter","entire","entirely",
68
- "environment","equal","equally","equator","equipment","escape","especially","essential",
69
- "establish","even","evening","event","eventually","ever","every","everybody",
70
- "everyone","everything","everywhere","evidence","exact","exactly","examine","example",
71
- "excellent","except","exchange","excited","excitement","exciting","exclaimed","exercise",
72
- "exist","expect","experience","experiment","explain","explanation","explore","express",
73
- "expression","extra","eye","face","facing","fact","factor","factory",
74
- "failed","fair","fairly","fall","fallen","familiar","family","famous",
75
- "far","farm","farmer","farther","fast","fastened","faster","fat",
76
- "father","favorite","fear","feathers","feature","fed","feed","feel",
77
- "feet","fell","fellow","felt","fence","few","fewer","field",
78
- "fierce","fifteen","fifth","fifty","fight","fighting","figure","fill",
79
- "film","final","finally","find","fine","finest","finger","finish",
80
- "fire","fireplace","firm","first","fish","five","fix","flag",
81
- "flame","flat","flew","flies","flight","floating","floor","flow",
82
- "flower","fly","fog","folks","follow","food","foot","football",
83
- "for","force","foreign","forest","forget","forgot","forgotten","form",
84
- "former","fort","forth","forty","forward","fought","found","four",
85
- "fourth","fox","frame","free","freedom","frequently","fresh","friend",
86
- "friendly","frighten","frog","from","front","frozen","fruit","fuel",
87
- "full","fully","fun","function","funny","fur","furniture","further",
88
- "future","gain","game","garage","garden","gas","gasoline","gate",
89
- "gather","gave","general","generally","gentle","gently","get","getting",
90
- "giant","gift","girl","give","given","giving","glad","glass",
91
- "globe","go","goes","gold","golden","gone","good","goose",
92
- "got","government","grabbed","grade","gradually","grain","grandfather","grandmother",
93
- "graph","grass","gravity","gray","great","greater","greatest","greatly",
94
- "green","grew","ground","group","grow","grown","growth","guard",
95
- "guess","guide","gulf","gun","habit","had","hair","half",
96
- "halfway","hall","hand","handle","handsome","hang","happen","happened",
97
- "happily","happy","harbor","hard","harder","hardly","has","hat",
98
- "have","having","hay","he","headed","heading","health","heard",
99
- "hearing","heart","heat","heavy","height","held","hello","help",
100
- "helpful","her","herd","here","herself","hidden","hide","high",
101
- "higher","highest","highway","hill","him","himself","his","history",
102
- "hit","hold","hole","hollow","home","honor","hope","horn",
103
- "horse","hospital","hot","hour","house","how","however","huge",
104
- "human","hundred","hung","hungry","hunt","hunter","hurried","hurry",
105
- "hurt","husband","ice","idea","identity","if","ill","image",
106
- "imagine","immediately","importance","important","impossible","improve","in","inch",
107
- "include","including","income","increase","indeed","independent","indicate","individual",
108
- "industrial","industry","influence","information","inside","instance","instant","instead",
109
- "instrument","interest","interior","into","introduced","invented","involved","iron",
110
- "is","island","it","its","itself","jack","jar","jet",
111
- "job","join","joined","journey","joy","judge","jump","jungle",
112
- "just","keep","kept","key","kids","kill","kind","kitchen",
113
- "knew","knife","know","knowledge","known","label","labor","lack",
114
- "lady","laid","lake","lamp","land","language","large","larger",
115
- "largest","last","late","later","laugh","law","lay","layers",
116
- "lead","leader","leaf","learn","least","leather","leave","leaving",
117
- "led","left","leg","length","lesson","let","letter","level",
118
- "library","lie","life","lift","light","like","likely","limited",
119
- "line","lion","lips","liquid","list","listen","little","live",
120
- "living","load","local","locate","location","log","lonely","long",
121
- "longer","look","loose","lose","loss","lost","lot","loud",
122
- "love","lovely","low","lower","luck","lucky","lunch","lungs",
123
- "lying","machine","machinery","mad","made","magic","magnet","mail",
124
- "main","mainly","major","make","making","man","managed","manner",
125
- "manufacturing","many","map","mark","market","married","mass","massage",
126
- "master","material","mathematics","matter","may","maybe","me","meal",
127
- "mean","means","meant","measure","meat","medicine","meet","melted",
128
- "member","memory","men","mental","merely","met","metal","method",
129
- "mice","middle","might","mighty","mile","military","milk","mill",
130
- "mind","mine","minerals","minute","mirror","missing","mission","mistake",
131
- "mix","mixture","model","modern","molecular","moment","money","monkey",
132
- "month","mood","moon","more","morning","most","mostly","mother",
133
- "motion","motor","mountain","mouse","mouth","move","movement","movie",
134
- "moving","mud","muscle","music","musical","must","my","myself",
135
- "mysterious","nails","name","nation","national","native","natural","naturally",
136
- "nature","near","nearby","nearer","nearest","nearly","necessary","neck",
137
- "needed","needle","needs","negative","neighbor","neighborhood","nervous","nest",
138
- "never","new","news","newspaper","next","nice","night","nine",
139
- "no","nobody","nodded","noise","none","noon","nor","north",
140
- "nose","not","note","noted","nothing","notice","noun","now",
141
- "number","numeral","nuts","object","observe","obtain","occasionally","occur",
142
- "ocean","of","off","offer","office","officer","official","oil",
143
- "old","older","oldest","on","once","one","only","onto",
144
- "open","operation","opinion","opportunity","opposite","or","orange","orbit",
145
- "order","ordinary","organization","organized","origin","original","other","ought",
146
- "our","ourselves","out","outer","outline","outside","over","own",
147
- "owner","oxygen","pack","package","page","paid","pain","paint",
148
- "pair","palace","pale","pan","paper","paragraph","parallel","parent",
149
- "park","part","particles","particular","particularly","partly","parts","party",
150
- "pass","passage","past","path","pattern","pay","peace","pen",
151
- "pencil","people","per","percent","perfect","perfectly","perhaps","period",
152
- "person","personal","pet","phrase","physical","piano","pick","picture",
153
- "pictured","pie","piece","pig","pile","pilot","pine","pink",
154
- "pipe","pitch","place","plain","plan","plane","planet","planned",
155
- "planning","plant","plastic","plate","plates","play","pleasant","please",
156
- "pleasure","plenty","plural","plus","pocket","poem","poet","poetry",
157
- "point","pole","police","policeman","political","pond","pony","pool",
158
- "poor","popular","population","porch","port","position","positive","possible",
159
- "possibly","post","pot","potatoes","pound","pour","powder","power",
160
- "powerful","practical","practice","prepare","present","president","press","pressure",
161
- "pretty","prevent","previous","price","pride","primitive","principal","principle",
162
- "printed","private","prize","probably","problem","process","produce","product",
163
- "production","program","progress","promised","proper","properly","property","protection",
164
- "proud","prove","provide","public","pull","pupil","pure","purple",
165
- "purpose","push","put","putting","quarter","queen","question","quick",
166
- "quickly","quiet","quietly","quite","rabbit","race","radio","railroad",
167
- "rain","raise","ran","ranch","range","rapidly","rate","rather",
168
- "raw","rays","reach","read","reader","ready","real","realize",
169
- "rear","reason","recall","receive","recent","recently","recognize","record",
170
- "red","refer","refused","region","regular","related","relationship","religious",
171
- "remain","remarkable","remember","remove","repeat","replace","replied","report",
172
- "represent","require","research","respect","rest","result","return","review",
173
- "rhyme","rhythm","rice","rich","ride","riding","right","ring",
174
- "rise","rising","river","road","roar","rock","rocket","rocky",
175
- "rod","roll","roof","room","root","rope","rose","rough",
176
- "round","route","row","rubbed","rubber","rule","ruler","run",
177
- "running","rush","sad","saddle","safe","safety","said","sail",
178
- "sale","salmon","salt","same","sand","sang","sat","satellites",
179
- "satisfied","save","saved","saw","say","scale","scared","scene",
180
- "school","science","scientific","scientist","score","screen","sea","search",
181
- "season","seat","second","secret","section","see","seed","seeing",
182
- "seems","seen","seldom","select","selection","sell","send","sense",
183
- "sent","sentence","separate","series","serious","serve","service","sets",
184
- "setting","settle","settlers","seven","several","shade","shadow","shake",
185
- "shaking","shall","shallow","shape","share","sharp","she","sheep",
186
- "sheet","shelf","shells","shelter","shine","shinning","ship","shirt",
187
- "shoe","shoot","shop","shore","short","shorter","shot","should",
188
- "shoulder","shout","show","shown","shut","sick","sides","sight",
189
- "sign","signal","silence","silent","silk","silly","silver","similar",
190
- "simple","simplest","simply","since","sing","single","sink","sister",
191
- "sit","sitting","situation","six","size","skill","skin","sky",
192
- "slabs","slave","sleep","slept","slide","slight","slightly","slip",
193
- "slipped","slope","slow","slowly","small","smaller","smallest","smell",
194
- "smile","smoke","smooth","snake","snow","so","soap","social",
195
- "society","soft","softly","soil","solar","sold","soldier","solid",
196
- "solution","solve","some","somebody","somehow","someone","something","sometime",
197
- "somewhere","son","song","soon","sort","sound","source","south",
198
- "southern","space","speak","special","species","specific","speech","speed",
199
- "spell","spend","spent","spider","spin","spirit","spite","split",
200
- "spoken","sport","spread","spring","square","stage","stairs","stand",
201
- "standard","star","stared","start","state","statement","station","stay",
202
- "steady","steam","steel","steep","stems","step","stepped","stick",
203
- "stiff","still","stock","stomach","stone","stood","stop","stopped",
204
- "store","storm","story","stove","straight","strange","stranger","straw",
205
- "stream","street","strength","stretch","strike","string","strip","strong",
206
- "stronger","struck","structure","struggle","stuck","student","studied","studying",
207
- "subject","substance","success","successful","such","sudden","suddenly","sugar",
208
- "suggest","suit","sum","summer","sun","sunlight","supper","supply",
209
- "support","suppose","sure","surface","surprise","surrounded","swam","sweet",
210
- "swept","swim","swimming","swing","swung","syllable","symbol","system",
211
- "table","tail","take","taken","tales","talk","tall","tank",
212
- "tape","task","taste","taught","tax","tea","teach","teacher",
213
- "team","tears","teeth","telephone","television","tell","temperature","ten",
214
- "tent","term","terrible","test","than","thank","that","thee",
215
- "them","themselves","then","theory","there","therefore","these","they",
216
- "thick","thin","thing","think","third","thirty","this","those",
217
- "thou","though","thought","thousand","thread","three","threw","throat",
218
- "through","throughout","throw","thrown","thumb","thus","thy","tide",
219
- "tie","tight","tightly","till","time","tin","tiny","tip",
220
- "tired","title","to","tobacco","today","together","told","tomorrow",
221
- "tone","tongue","tonight","too","took","tool","top","topic",
222
- "torn","total","touch","toward","tower","town","toy","trace",
223
- "track","trade","traffic","trail","train","transportation","trap","travel",
224
- "treated","tree","triangle","tribe","trick","tried","trip","troops",
225
- "tropical","trouble","truck","trunk","truth","try","tube","tune",
226
- "turn","twelve","twenty","twice","two","type","typical","uncle",
227
- "under","underline","understanding","unhappy","union","unit","universe","unknown",
228
- "unless","until","unusual","up","upon","upper","upward","us",
229
- "use","useful","using","usual","usually","valley","valuable","value",
230
- "vapor","variety","various","vast","vegetable","verb","vertical","very",
231
- "vessels","victory","view","village","visit","visitor","voice","volume",
232
- "vote","vowel","voyage","wagon","wait","walk","wall","want",
233
- "war","warm","warn","was","wash","waste","watch","water",
234
- "wave","way","we","weak","wealth","wear","weather","week",
235
- "weigh","weight","welcome","well","went","were","west","western",
236
- "wet","whale","what","whatever","wheat","wheel","when","whenever",
237
- "where","wherever","whether","which","while","whispered","whistle","white",
238
- "who","whole","whom","whose","why","wide","widely","wife",
239
- "wild","will","willing","win","wind","window","wing","winter",
240
- "wire","wise","wish","with","within","without","wolf","women",
241
- "won","wonder","wonderful","wood","wooden","wool","word","wore",
242
- "work","worker","world","worried","worry","worse","worth","would",
243
- "wrapped","write","writer","writing","written","wrong","wrote","yard",
244
- "year","yellow","yes","yesterday","yet","you","young","younger",
245
- "your","yourself","youth","zero","zebra","zipper","zoo","zulu"
246
- ];
247
-
248
- module.exports = (options) => {
249
-
250
- const [
251
- randInt, generateRandomWord, generateWordWithMaxLength,
252
- ] = [
253
- (less) => Math.floor(Math.random() * less),
254
- () => wordList[randInt(wordList.length)],
255
- () => {
256
- let [ rightSize, wordUsed ] = [ false, undefined ];
257
- while (!rightSize) {
258
- wordUsed = generateRandomWord();
259
- if(wordUsed.length <= options.maxLength) rightSize = true;
260
- }
261
- return wordUsed;
262
- }
263
- ],
264
- word = () => {
265
- if (options && options.maxLength > 1) return generateWordWithMaxLength();
266
- else return generateRandomWord();
267
- }
268
- if (!options) return word();
269
- if (typeof options === "number") options = { exactly: options };
270
-
271
- if (options.exactly) {
272
- options.min = options.exactly;
273
- options.max = options.exactly;
274
- }
275
-
276
- if (typeof options.wordsPerString !== 'number') options.wordsPerString = 1;
277
- if (typeof options.formatter !== 'function') options.formatter = (word) => word;
278
- if (typeof options.separator !== 'string') options.separator = ' ';
279
- let [ total, results, token, relativeIndex ] = [
280
- options.min + randInt((options.max + 1) - options.min),
281
- [],
282
- "",
283
- 0
284
- ]
285
-
286
- for (let i = 0; (i < total * options.wordsPerString); i++) {
287
- if (relativeIndex === options.wordsPerString - 1) token += options.formatter(word(), relativeIndex);
288
- else token += options.formatter(word(), relativeIndex) + options.separator;
289
- relativeIndex++;
290
- if ((i + 1) % options.wordsPerString === 0) {
291
- results.push(token);
292
- token = '';
293
- relativeIndex = 0;
294
- }
295
-
296
- }
297
- if (typeof options.join === 'string') results = results.join(options.join);
298
-
299
- return results;
300
- };