apexify.js 4.4.36 → 4.5.1

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 (217) hide show
  1. package/README.md +26 -199
  2. package/dist/ai/ApexAI.d.ts +30 -18
  3. package/dist/ai/ApexAI.d.ts.map +1 -1
  4. package/dist/ai/ApexAI.js +34 -171
  5. package/dist/ai/ApexAI.js.map +1 -1
  6. package/dist/ai/ApexModules.d.ts.map +1 -1
  7. package/dist/ai/ApexModules.js +42 -127
  8. package/dist/ai/ApexModules.js.map +1 -1
  9. package/dist/ai/functions/draw.d.ts +6 -1
  10. package/dist/ai/functions/draw.d.ts.map +1 -1
  11. package/dist/ai/functions/draw.js +550 -722
  12. package/dist/ai/functions/draw.js.map +1 -1
  13. package/dist/ai/functions/generateVoiceResponse.d.ts +6 -1
  14. package/dist/ai/functions/generateVoiceResponse.d.ts.map +1 -1
  15. package/dist/ai/functions/generateVoiceResponse.js +2 -2
  16. package/dist/ai/functions/generateVoiceResponse.js.map +1 -1
  17. package/dist/ai/functions/validOptions.d.ts +14 -7
  18. package/dist/ai/functions/validOptions.d.ts.map +1 -1
  19. package/dist/ai/functions/validOptions.js +23 -22
  20. package/dist/ai/functions/validOptions.js.map +1 -1
  21. package/dist/ai/modals-chat/electronHub/imageModels.d.ts +7 -0
  22. package/dist/ai/modals-chat/electronHub/imageModels.d.ts.map +1 -0
  23. package/dist/ai/modals-chat/electronHub/imageModels.js +28 -0
  24. package/dist/ai/modals-chat/electronHub/imageModels.js.map +1 -0
  25. package/dist/ai/modals-chat/freesedgpt/cartoon.d.ts +2 -0
  26. package/dist/ai/modals-chat/freesedgpt/cartoon.d.ts.map +1 -0
  27. package/dist/ai/modals-chat/freesedgpt/cartoon.js +26 -0
  28. package/dist/ai/modals-chat/freesedgpt/cartoon.js.map +1 -0
  29. package/dist/ai/modals-chat/freesedgpt/chat.d.ts +5 -0
  30. package/dist/ai/modals-chat/freesedgpt/chat.d.ts.map +1 -0
  31. package/dist/ai/modals-chat/freesedgpt/chat.js +30 -0
  32. package/dist/ai/modals-chat/freesedgpt/chat.js.map +1 -0
  33. package/dist/ai/modals-chat/freesedgpt/flux.d.ts +2 -0
  34. package/dist/ai/modals-chat/freesedgpt/flux.d.ts.map +1 -0
  35. package/dist/ai/modals-chat/freesedgpt/flux.js +26 -0
  36. package/dist/ai/modals-chat/freesedgpt/flux.js.map +1 -0
  37. package/dist/ai/modals-chat/gemini/Gemini-flash.d.ts.map +1 -0
  38. package/dist/ai/modals-chat/{Gemini-flash.js → gemini/Gemini-flash.js} +2 -2
  39. package/dist/ai/modals-chat/gemini/Gemini-flash.js.map +1 -0
  40. package/dist/ai/modals-chat/gemini/Gemini-pro.d.ts.map +1 -0
  41. package/dist/ai/modals-chat/{Gemini-pro.js → gemini/Gemini-pro.js} +2 -2
  42. package/dist/ai/modals-chat/gemini/Gemini-pro.js.map +1 -0
  43. package/dist/ai/modals-chat/gemini/config.d.ts.map +1 -0
  44. package/dist/ai/modals-chat/gemini/config.js.map +1 -0
  45. package/dist/ai/modals-chat/gemini/geminiFast.d.ts.map +1 -0
  46. package/dist/ai/modals-chat/gemini/geminiFast.js.map +1 -0
  47. package/dist/ai/modals-chat/groq/chatgroq.d.ts +9 -0
  48. package/dist/ai/modals-chat/groq/chatgroq.d.ts.map +1 -0
  49. package/dist/ai/modals-chat/groq/chatgroq.js +58 -0
  50. package/dist/ai/modals-chat/groq/chatgroq.js.map +1 -0
  51. package/dist/ai/modals-chat/groq/imageAnalyzer.d.ts +8 -0
  52. package/dist/ai/modals-chat/groq/imageAnalyzer.d.ts.map +1 -0
  53. package/dist/ai/modals-chat/groq/imageAnalyzer.js +64 -0
  54. package/dist/ai/modals-chat/groq/imageAnalyzer.js.map +1 -0
  55. package/dist/ai/modals-chat/groq/whisper.d.ts.map +1 -0
  56. package/dist/ai/modals-chat/{whisper.js → groq/whisper.js} +2 -2
  57. package/dist/ai/modals-chat/groq/whisper.js.map +1 -0
  58. package/dist/ai/modals-chat/hercai/chatModals.d.ts +7 -0
  59. package/dist/ai/modals-chat/hercai/chatModals.d.ts.map +1 -0
  60. package/dist/ai/modals-chat/hercai/chatModals.js +23 -0
  61. package/dist/ai/modals-chat/hercai/chatModals.js.map +1 -0
  62. package/dist/ai/modals-chat/hercai/chatModels.d.ts +7 -0
  63. package/dist/ai/modals-chat/hercai/chatModels.d.ts.map +1 -0
  64. package/dist/ai/modals-chat/hercai/chatModels.js +23 -0
  65. package/dist/ai/modals-chat/hercai/chatModels.js.map +1 -0
  66. package/dist/ai/modals-chat/others/otherModels.d.ts +7 -0
  67. package/dist/ai/modals-chat/others/otherModels.d.ts.map +1 -0
  68. package/dist/ai/modals-chat/others/otherModels.js +88 -0
  69. package/dist/ai/modals-chat/others/otherModels.js.map +1 -0
  70. package/dist/ai/modals-chat/rsn/rsnChat.d.ts +8 -0
  71. package/dist/ai/modals-chat/rsn/rsnChat.d.ts.map +1 -0
  72. package/dist/ai/modals-chat/{bing.js → rsn/rsnChat.js} +29 -8
  73. package/dist/ai/modals-chat/rsn/rsnChat.js.map +1 -0
  74. package/dist/ai/modals-images/cartoon.js +1 -1
  75. package/dist/ai/modals-images/cartoon.js.map +1 -1
  76. package/dist/ai/modals-images/flux.js +1 -1
  77. package/dist/ai/modals-images/flux.js.map +1 -1
  78. package/dist/ai/utils.d.ts +4 -7
  79. package/dist/ai/utils.d.ts.map +1 -1
  80. package/dist/ai/utils.js +6 -12
  81. package/dist/ai/utils.js.map +1 -1
  82. package/dist/index.d.ts +14 -9
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.js +6 -3
  85. package/dist/index.js.map +1 -1
  86. package/lib/ai/ApexAI.ts +90 -191
  87. package/lib/ai/ApexModules.ts +45 -135
  88. package/lib/ai/functions/draw.ts +572 -788
  89. package/lib/ai/functions/generateVoiceResponse.ts +2 -2
  90. package/lib/ai/functions/validOptions.ts +24 -23
  91. package/lib/ai/modals-chat/electronHub/imageModels.ts +26 -0
  92. package/lib/ai/{modals-images → modals-chat/freesedgpt}/cartoon.ts +3 -3
  93. package/lib/ai/modals-chat/freesedgpt/chat.ts +31 -0
  94. package/lib/ai/{modals-images → modals-chat/freesedgpt}/flux.ts +3 -3
  95. package/lib/ai/modals-chat/{Gemini-flash.ts → gemini/Gemini-flash.ts} +2 -2
  96. package/lib/ai/modals-chat/{Gemini-pro.ts → gemini/Gemini-pro.ts} +2 -2
  97. package/lib/ai/modals-chat/groq/chatgroq.ts +68 -0
  98. package/lib/ai/modals-chat/groq/imageAnalyzer.ts +68 -0
  99. package/lib/ai/modals-chat/{whisper.ts → groq/whisper.ts} +2 -2
  100. package/lib/ai/modals-chat/hercai/chatModels.ts +20 -0
  101. package/lib/ai/modals-chat/others/otherModels.ts +99 -0
  102. package/lib/ai/modals-chat/rsn/rsnChat.ts +74 -0
  103. package/lib/ai/utils.ts +7 -12
  104. package/lib/index.ts +5 -3
  105. package/package.json +1 -1
  106. package/dist/ai/functions/imageAnalysis.d.ts +0 -2
  107. package/dist/ai/functions/imageAnalysis.d.ts.map +0 -1
  108. package/dist/ai/functions/imageAnalysis.js +0 -45
  109. package/dist/ai/functions/imageAnalysis.js.map +0 -1
  110. package/dist/ai/functions/readImagess.d.ts +0 -2
  111. package/dist/ai/functions/readImagess.d.ts.map +0 -1
  112. package/dist/ai/functions/readImagess.js +0 -45
  113. package/dist/ai/functions/readImagess.js.map +0 -1
  114. package/dist/ai/modals-chat/Gemini-flash.d.ts.map +0 -1
  115. package/dist/ai/modals-chat/Gemini-flash.js.map +0 -1
  116. package/dist/ai/modals-chat/Gemini-pro.d.ts.map +0 -1
  117. package/dist/ai/modals-chat/Gemini-pro.js.map +0 -1
  118. package/dist/ai/modals-chat/apexChat.d.ts +0 -2
  119. package/dist/ai/modals-chat/apexChat.d.ts.map +0 -1
  120. package/dist/ai/modals-chat/apexChat.js +0 -32
  121. package/dist/ai/modals-chat/apexChat.js.map +0 -1
  122. package/dist/ai/modals-chat/bard.d.ts +0 -7
  123. package/dist/ai/modals-chat/bard.d.ts.map +0 -1
  124. package/dist/ai/modals-chat/bard.js +0 -48
  125. package/dist/ai/modals-chat/bard.js.map +0 -1
  126. package/dist/ai/modals-chat/bing.d.ts +0 -7
  127. package/dist/ai/modals-chat/bing.d.ts.map +0 -1
  128. package/dist/ai/modals-chat/bing.js.map +0 -1
  129. package/dist/ai/modals-chat/codellama.d.ts +0 -7
  130. package/dist/ai/modals-chat/codellama.d.ts.map +0 -1
  131. package/dist/ai/modals-chat/codellama.js +0 -48
  132. package/dist/ai/modals-chat/codellama.js.map +0 -1
  133. package/dist/ai/modals-chat/config.d.ts.map +0 -1
  134. package/dist/ai/modals-chat/config.js.map +0 -1
  135. package/dist/ai/modals-chat/facebook-ai.d.ts +0 -2
  136. package/dist/ai/modals-chat/facebook-ai.d.ts.map +0 -1
  137. package/dist/ai/modals-chat/facebook-ai.js +0 -20
  138. package/dist/ai/modals-chat/facebook-ai.js.map +0 -1
  139. package/dist/ai/modals-chat/geminiFast.d.ts.map +0 -1
  140. package/dist/ai/modals-chat/geminiFast.js.map +0 -1
  141. package/dist/ai/modals-chat/geminiV2.d.ts +0 -7
  142. package/dist/ai/modals-chat/geminiV2.d.ts.map +0 -1
  143. package/dist/ai/modals-chat/geminiV2.js +0 -48
  144. package/dist/ai/modals-chat/geminiV2.js.map +0 -1
  145. package/dist/ai/modals-chat/gemma.d.ts +0 -2
  146. package/dist/ai/modals-chat/gemma.d.ts.map +0 -1
  147. package/dist/ai/modals-chat/gemma.js +0 -43
  148. package/dist/ai/modals-chat/gemma.js.map +0 -1
  149. package/dist/ai/modals-chat/llama.d.ts +0 -7
  150. package/dist/ai/modals-chat/llama.d.ts.map +0 -1
  151. package/dist/ai/modals-chat/llama.js +0 -48
  152. package/dist/ai/modals-chat/llama.js.map +0 -1
  153. package/dist/ai/modals-chat/llamav2.d.ts +0 -2
  154. package/dist/ai/modals-chat/llamav2.d.ts.map +0 -1
  155. package/dist/ai/modals-chat/llamav2.js +0 -43
  156. package/dist/ai/modals-chat/llamav2.js.map +0 -1
  157. package/dist/ai/modals-chat/llamav3.d.ts +0 -2
  158. package/dist/ai/modals-chat/llamav3.d.ts.map +0 -1
  159. package/dist/ai/modals-chat/llamav3.js +0 -43
  160. package/dist/ai/modals-chat/llamav3.js.map +0 -1
  161. package/dist/ai/modals-chat/mixtral.d.ts +0 -7
  162. package/dist/ai/modals-chat/mixtral.d.ts.map +0 -1
  163. package/dist/ai/modals-chat/mixtral.js +0 -48
  164. package/dist/ai/modals-chat/mixtral.js.map +0 -1
  165. package/dist/ai/modals-chat/mixtralv2.d.ts +0 -2
  166. package/dist/ai/modals-chat/mixtralv2.d.ts.map +0 -1
  167. package/dist/ai/modals-chat/mixtralv2.js +0 -43
  168. package/dist/ai/modals-chat/mixtralv2.js.map +0 -1
  169. package/dist/ai/modals-chat/modals.d.ts +0 -8
  170. package/dist/ai/modals-chat/modals.d.ts.map +0 -1
  171. package/dist/ai/modals-chat/modals.js +0 -16
  172. package/dist/ai/modals-chat/modals.js.map +0 -1
  173. package/dist/ai/modals-chat/openChat.d.ts +0 -7
  174. package/dist/ai/modals-chat/openChat.d.ts.map +0 -1
  175. package/dist/ai/modals-chat/openChat.js +0 -48
  176. package/dist/ai/modals-chat/openChat.js.map +0 -1
  177. package/dist/ai/modals-chat/starChat.d.ts +0 -2
  178. package/dist/ai/modals-chat/starChat.d.ts.map +0 -1
  179. package/dist/ai/modals-chat/starChat.js +0 -31
  180. package/dist/ai/modals-chat/starChat.js.map +0 -1
  181. package/dist/ai/modals-chat/v4.d.ts +0 -7
  182. package/dist/ai/modals-chat/v4.d.ts.map +0 -1
  183. package/dist/ai/modals-chat/v4.js +0 -48
  184. package/dist/ai/modals-chat/v4.js.map +0 -1
  185. package/dist/ai/modals-chat/whisper.d.ts.map +0 -1
  186. package/dist/ai/modals-chat/whisper.js.map +0 -1
  187. package/dist/ai/modals-chat/yi-ai.d.ts +0 -2
  188. package/dist/ai/modals-chat/yi-ai.d.ts.map +0 -1
  189. package/dist/ai/modals-chat/yi-ai.js +0 -40
  190. package/dist/ai/modals-chat/yi-ai.js.map +0 -1
  191. package/lib/ai/functions/imageAnalysis.ts +0 -41
  192. package/lib/ai/modals-chat/apexChat.ts +0 -31
  193. package/lib/ai/modals-chat/bard.ts +0 -44
  194. package/lib/ai/modals-chat/bing.ts +0 -44
  195. package/lib/ai/modals-chat/codellama.ts +0 -44
  196. package/lib/ai/modals-chat/facebook-ai.ts +0 -14
  197. package/lib/ai/modals-chat/geminiV2.ts +0 -44
  198. package/lib/ai/modals-chat/gemma.ts +0 -35
  199. package/lib/ai/modals-chat/llama.ts +0 -44
  200. package/lib/ai/modals-chat/llamav2.ts +0 -35
  201. package/lib/ai/modals-chat/llamav3.ts +0 -35
  202. package/lib/ai/modals-chat/mixtral.ts +0 -45
  203. package/lib/ai/modals-chat/mixtralv2.ts +0 -35
  204. package/lib/ai/modals-chat/modals.ts +0 -8
  205. package/lib/ai/modals-chat/openChat.ts +0 -44
  206. package/lib/ai/modals-chat/starChat.ts +0 -31
  207. package/lib/ai/modals-chat/v4.ts +0 -44
  208. package/lib/ai/modals-chat/yi-ai.ts +0 -40
  209. /package/dist/ai/modals-chat/{Gemini-flash.d.ts → gemini/Gemini-flash.d.ts} +0 -0
  210. /package/dist/ai/modals-chat/{Gemini-pro.d.ts → gemini/Gemini-pro.d.ts} +0 -0
  211. /package/dist/ai/modals-chat/{config.d.ts → gemini/config.d.ts} +0 -0
  212. /package/dist/ai/modals-chat/{config.js → gemini/config.js} +0 -0
  213. /package/dist/ai/modals-chat/{geminiFast.d.ts → gemini/geminiFast.d.ts} +0 -0
  214. /package/dist/ai/modals-chat/{geminiFast.js → gemini/geminiFast.js} +0 -0
  215. /package/dist/ai/modals-chat/{whisper.d.ts → groq/whisper.d.ts} +0 -0
  216. /package/lib/ai/modals-chat/{config.ts → gemini/config.ts} +0 -0
  217. /package/lib/ai/modals-chat/{geminiFast.ts → gemini/geminiFast.ts} +0 -0
@@ -1,13 +1,24 @@
1
1
  import translate from "@iamtraction/google-translate";
2
2
  import sharp from "sharp";
3
- import { ButtonBuilder, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, ButtonStyle, ActionRowBuilder, AttachmentBuilder, AttachmentData } from "discord.js";
3
+ import {
4
+ ButtonBuilder,
5
+ StringSelectMenuBuilder,
6
+ StringSelectMenuOptionBuilder,
7
+ ButtonStyle,
8
+ ActionRowBuilder,
9
+ AttachmentBuilder,
10
+ AttachmentData
11
+ } from "discord.js";
4
12
  import axios from "axios";
5
- import { validOptions } from './validOptions';
13
+ import { validateModels } from './validOptions';
6
14
  import api from "api";
7
- import { cartoon } from "../modals-images/cartoon";
8
- import { flux } from "../modals-images/flux";
15
+ import { groqAnalyzer } from "../utils";
16
+ import { flux } from "../modals-chat/freesedgpt/flux";
17
+ import { cartoon } from "../modals-chat/freesedgpt/cartoon";
18
+ import { rsnAPI } from "../modals-chat/rsn/rsnChat";
9
19
 
10
20
  const sdk: any = api("@prodia/v1.3.0#be019b2kls0gqss3");
21
+
11
22
  async function aiImagine(
12
23
  message: any,
13
24
  numOfImages: number,
@@ -20,24 +31,20 @@ async function aiImagine(
20
31
  enhancer: any,
21
32
  buttons: any[],
22
33
  RespondMessage: any,
23
- imgKey: string
34
+ imageAPIS?: { groqAPI?: string, rsnAPI?: string, prodiaAPI?: string, freesedGPTApi?: string }
24
35
  ) {
25
- sdk.auth(imgKey);
26
-
27
36
  const maxRetryAttempts = 4;
28
37
  const retryInterval = 5000;
29
- let response: any;
30
- const imageType = await validOptions;
38
+ const imageType = await validateModels;
39
+ const attachData: AttachmentData[] = [];
40
+ const buttonsRow1: ButtonBuilder[] = [];
41
+ const imageUrls: string[] = [];
31
42
 
32
43
  async function retry(fn: any, retriesLeft = maxRetryAttempts) {
33
-
34
44
  try {
35
45
  return await fn();
36
46
  } catch (error: any) {
37
- if (retriesLeft === 0) {
38
- throw error;
39
- }
40
-
47
+ if (retriesLeft === 0) throw error;
41
48
  await new Promise((resolve) => setTimeout(resolve, retryInterval));
42
49
  return retry(fn, retriesLeft - 1);
43
50
  }
@@ -45,778 +52,605 @@ async function aiImagine(
45
52
 
46
53
  try {
47
54
  if (numOfImages > 4 || numOfImages <= 0) {
48
- throw new Error(
49
- `Number of images can't be greater than 4 or smaller than 0.`,
50
- );
55
+ throw new Error("Number of images can't be greater than 4 or smaller than 0.");
51
56
  }
52
57
 
53
58
  await message.channel?.sendTyping();
54
59
 
55
60
  const translatedText = await retry(() =>
56
- translate(textToDraw, {
57
- from: "auto",
58
- to: "en",
59
- }),
61
+ translate(textToDraw, { from: "auto", to: "en" })
60
62
  );
61
63
 
62
- const attachData: AttachmentData[] = [];
63
- const buttonsRow1: ButtonBuilder[] = [];
64
- const imageUrls: any = [];
65
-
66
- for (let _0x4d7fb6 = 0x0; _0x4d7fb6 < numOfImages; _0x4d7fb6++) {
67
- try {
68
- if (imageModal === 'prodia-v2') {
69
- response = await retry(() =>
70
- hercai.betaDrawImage({
71
- prompt: translatedText.text,
72
- negative_prompt: enhancer.negative_prompt,
73
- sampler: enhancer.sampler,
74
- image_style: enhancer.imgStyle,
75
- width: enhancer.width,
76
- height: enhancer.height,
77
- steps: enhancer.steps,
78
- scale: enhancer.cfgScale,
79
- }),
80
- );
81
- if (response.url === 'This Modal is Currently Under Maintenance.') throw new Error('this model is under Maintenance for a while.')
64
+ const nsfwWords: string[] = nsfwKeyWords || [
65
+ "2g1c",
66
+ "2 girls 1 cup",
67
+ "acrotomophilia",
68
+ "alabama hot pocket",
69
+ "alaskan pipeline",
70
+ "anal",
71
+ "anilingus",
72
+ "anus",
73
+ "apeshit",
74
+ "arsehole",
75
+ "ass",
76
+ "asshole",
77
+ "assmunch",
78
+ "auto erotic",
79
+ "autoerotic",
80
+ "babeland",
81
+ "baby batter",
82
+ "baby juice",
83
+ "ball gag",
84
+ "ball gravy",
85
+ "ball kicking",
86
+ "ball licking",
87
+ "ball sack",
88
+ "ball sucking",
89
+ "bangbros",
90
+ "bangbus",
91
+ "bareback",
92
+ "barely legal",
93
+ "barenaked",
94
+ "bastard",
95
+ "bastardo",
96
+ "bastinado",
97
+ "bbw",
98
+ "bdsm",
99
+ "beaner",
100
+ "beaners",
101
+ "beaver cleaver",
102
+ "beaver lips",
103
+ "beastiality",
104
+ "bestiality",
105
+ "big black",
106
+ "big breasts",
107
+ "big knockers",
108
+ "big tits",
109
+ "bimbos",
110
+ "birdlock",
111
+ "bitch",
112
+ "bitches",
113
+ "black cock",
114
+ "blonde action",
115
+ "blonde on blonde action",
116
+ "blowjob",
117
+ "blow job",
118
+ "blow your load",
119
+ "blue waffle",
120
+ "blumpkin",
121
+ "bollocks",
122
+ "bondage",
123
+ "boner",
124
+ "boob",
125
+ "boobs",
126
+ "booty call",
127
+ "brown showers",
128
+ "brunette action",
129
+ "bukkake",
130
+ "bulldyke",
131
+ "bullet vibe",
132
+ "bullshit",
133
+ "bung hole",
134
+ "bunghole",
135
+ "busty",
136
+ "butt",
137
+ "buttcheeks",
138
+ "butthole",
139
+ "camel toe",
140
+ "camgirl",
141
+ "camslut",
142
+ "camwhore",
143
+ "carpet muncher",
144
+ "carpetmuncher",
145
+ "chocolate rosebuds",
146
+ "cialis",
147
+ "circlejerk",
148
+ "cleveland steamer",
149
+ "clit",
150
+ "clitoris",
151
+ "clover clamps",
152
+ "clusterfuck",
153
+ "cock",
154
+ "cocks",
155
+ "coprolagnia",
156
+ "coprophilia",
157
+ "cornhole",
158
+ "coon",
159
+ "coons",
160
+ "creampie",
161
+ "cum",
162
+ "cumming",
163
+ "cumshot",
164
+ "cumshots",
165
+ "cunnilingus",
166
+ "cunt",
167
+ "darkie",
168
+ "date rape",
169
+ "daterape",
170
+ "deep throat",
171
+ "deepthroat",
172
+ "dendrophilia",
173
+ "dick",
174
+ "dildo",
175
+ "dingleberry",
176
+ "dingleberries",
177
+ "dirty pillows",
178
+ "dirty sanchez",
179
+ "doggie style",
180
+ "doggiestyle",
181
+ "doggy style",
182
+ "doggystyle",
183
+ "dog style",
184
+ "dolcett",
185
+ "domination",
186
+ "dominatrix",
187
+ "dommes",
188
+ "donkey punch",
189
+ "double dong",
190
+ "double penetration",
191
+ "dp action",
192
+ "dry hump",
193
+ "dvda",
194
+ "eat my ass",
195
+ "ecchi",
196
+ "ejaculation",
197
+ "erotic",
198
+ "erotism",
199
+ "escort",
200
+ "eunuch",
201
+ "fag",
202
+ "faggot",
203
+ "fecal",
204
+ "felch",
205
+ "fellatio",
206
+ "feltch",
207
+ "female squirting",
208
+ "femdom",
209
+ "figging",
210
+ "fingerbang",
211
+ "fingering",
212
+ "fisting",
213
+ "foot fetish",
214
+ "footjob",
215
+ "frotting",
216
+ "fuck",
217
+ "fuck buttons",
218
+ "fuckin",
219
+ "fucking",
220
+ "fucktards",
221
+ "fudge packer",
222
+ "fudgepacker",
223
+ "futanari",
224
+ "gangbang",
225
+ "gang bang",
226
+ "gay sex",
227
+ "genitals",
228
+ "giant cock",
229
+ "girl on",
230
+ "girl on top",
231
+ "girls gone wild",
232
+ "goatcx",
233
+ "goatse",
234
+ "god damn",
235
+ "gokkun",
236
+ "golden shower",
237
+ "goodpoop",
238
+ "goo girl",
239
+ "goregasm",
240
+ "grope",
241
+ "group sex",
242
+ "g-spot",
243
+ "guro",
244
+ "hand job",
245
+ "handjob",
246
+ "hard core",
247
+ "hardcore",
248
+ "hentai",
249
+ "homoerotic",
250
+ "honkey",
251
+ "hooker",
252
+ "horny",
253
+ "hot carl",
254
+ "hot chick",
255
+ "how to kill",
256
+ "how to murder",
257
+ "huge fat",
258
+ "humping",
259
+ "incest",
260
+ "intercourse",
261
+ "jack off",
262
+ "jail bait",
263
+ "jailbait",
264
+ "jelly donut",
265
+ "jerk off",
266
+ "jigaboo",
267
+ "jiggaboo",
268
+ "jiggerboo",
269
+ "jizz",
270
+ "juggs",
271
+ "kike",
272
+ "kinbaku",
273
+ "kinkster",
274
+ "kinky",
275
+ "knobbing",
276
+ "leather restraint",
277
+ "leather straight jacket",
278
+ "lemon party",
279
+ "livesex",
280
+ "lolita",
281
+ "lovemaking",
282
+ "make me come",
283
+ "male squirting",
284
+ "masturbate",
285
+ "masturbating",
286
+ "masturbation",
287
+ "menage a trois",
288
+ "milf",
289
+ "missionary position",
290
+ "mong",
291
+ "motherfucker",
292
+ "mound of venus",
293
+ "mr hands",
294
+ "muff diver",
295
+ "muffdiving",
296
+ "nambla",
297
+ "nawashi",
298
+ "negro",
299
+ "neonazi",
300
+ "nigga",
301
+ "nigger",
302
+ "nig nog",
303
+ "nimphomania",
304
+ "nipple",
305
+ "nipples",
306
+ "nsfw",
307
+ 'nsfw images',
308
+ "nude",
309
+ "nudity",
310
+ "nutten",
311
+ "nympho",
312
+ "nymphomania",
313
+ "octopussy",
314
+ "omorashi",
315
+ "one cup two girls",
316
+ 'one guy one jar',
317
+ "orgasm",
318
+ "orgy",
319
+ 'paedophile',
320
+ "paki",
321
+ "panties",
322
+ "panty",
323
+ "pedobear",
324
+ "pedophile",
325
+ 'pegging',
326
+ 'penis',
327
+ "phone sex",
328
+ 'piece of shit',
329
+ "pikey",
330
+ "pissing",
331
+ "piss pig",
332
+ "pisspig",
333
+ "playboy",
334
+ "pleasure chest",
335
+ "pole smoker",
336
+ "ponyplay",
337
+ "poof",
338
+ "poon",
339
+ "poontang",
340
+ "punany",
341
+ "poop chute",
342
+ "poopchute",
343
+ "porn",
344
+ "porno",
345
+ "pornography",
346
+ "prince albert piercing",
347
+ "pthc",
348
+ "pubes",
349
+ "pussy",
350
+ "queaf",
351
+ "queef",
352
+ "quim",
353
+ "raghead",
354
+ "raging boner",
355
+ "rape",
356
+ "raping",
357
+ "rapist",
358
+ "rectum",
359
+ "reverse cowgirl",
360
+ "rimjob",
361
+ "rimming",
362
+ "rosy palm",
363
+ "rosy palm and her 5 sisters",
364
+ "rusty trombone",
365
+ "sadism",
366
+ "santorum",
367
+ "scat",
368
+ "schlong",
369
+ "scissoring",
370
+ "semen",
371
+ "sex",
372
+ "sexcam",
373
+ "sexo",
374
+ "sexy",
375
+ "sexual",
376
+ "sexually",
377
+ "sexuality",
378
+ "shaved beaver",
379
+ "shaved pussy",
380
+ "shemale",
381
+ "shibari",
382
+ "shit",
383
+ "shitblimp",
384
+ "shitty",
385
+ "shota",
386
+ "shrimping",
387
+ "skeet",
388
+ "slanteye",
389
+ "slut",
390
+ "s&m",
391
+ "smut",
392
+ "snatch",
393
+ "snowballing",
394
+ "sodomize",
395
+ "sodomy",
396
+ "spastic",
397
+ "spic",
398
+ "splooge",
399
+ "splooge moose",
400
+ "spooge",
401
+ "spread legs",
402
+ "spunk",
403
+ "strap on",
404
+ "strapon",
405
+ "strappado",
406
+ "strip club",
407
+ "style doggy",
408
+ "suck",
409
+ "sucks",
410
+ "suicide girls",
411
+ "sultry women",
412
+ "swastika",
413
+ "swinger",
414
+ "tainted love",
415
+ "taste my",
416
+ "tea bagging",
417
+ "threesome",
418
+ "throating",
419
+ "thumbzilla",
420
+ "tied up",
421
+ "tight white",
422
+ "tit",
423
+ "tits",
424
+ "titties",
425
+ "titty",
426
+ "topless",
427
+ "tosser",
428
+ "towelhead",
429
+ "tranny",
430
+ "tribadism",
431
+ "tub girl",
432
+ 'tubgirl',
433
+ "tushy",
434
+ "twat",
435
+ "twink",
436
+ "twinkie",
437
+ "two girls one cup",
438
+ "undressing",
439
+ 'upskirt',
440
+ "urethra play",
441
+ "urophilia",
442
+ "vagina",
443
+ "venus mound",
444
+ "viagra",
445
+ "vibrator",
446
+ "violet wand",
447
+ "vorarephilia",
448
+ "voyeur",
449
+ "voyeurweb",
450
+ "voyuer",
451
+ "vulva",
452
+ "wank",
453
+ "wetback",
454
+ "wet dream",
455
+ "white power",
456
+ "whore",
457
+ "worldsex",
458
+ "wrapping men",
459
+ "wrinkled starfish",
460
+ "xx",
461
+ "xxx",
462
+ "yaoi",
463
+ "yellow showers",
464
+ "yiffy",
465
+ "zoophilia",
466
+ "anal",
467
+ "arousal",
468
+ "balls",
469
+ "blowjob",
470
+ "busty",
471
+ "butt",
472
+ "cameltoe",
473
+ "climax",
474
+ "clitoris",
475
+ "cock",
476
+ "crotch",
477
+ "cum",
478
+ "cumshot",
479
+ "cunnilingus",
480
+ "dirty",
481
+ "dirtytalk",
482
+ "dildo",
483
+ "erect",
484
+ "erogenous",
485
+ "escort",
486
+ "explicit",
487
+ "facial",
488
+ "fetish",
489
+ "flirt",
490
+ "foreplay",
491
+ "genitals",
492
+ "groin",
493
+ "hardcore",
494
+ "hardon",
495
+ "horniness",
496
+ "horny",
497
+ "kamasutra",
498
+ "kinky",
499
+ "lewd",
500
+ "lingerie",
501
+ "lust",
502
+ "lustful",
503
+ "masturbate",
504
+ "mature",
505
+ "milf",
506
+ "naughty",
507
+ "naked",
508
+ "nipples",
509
+ "nude",
510
+ "obscene",
511
+ "oral",
512
+ "orgasm",
513
+ "penetration",
514
+ "penis",
515
+ "pleasure",
516
+ "porn",
517
+ "prostitute",
518
+ "provocative",
519
+ "pubic",
520
+ "pussy",
521
+ "seduce",
522
+ "seductive",
523
+ "sensual",
524
+ "sex",
525
+ "sexual",
526
+ "sperm",
527
+ "strip",
528
+ "striptease",
529
+ "swinger",
530
+ "testicles",
531
+ "thong",
532
+ "threesome",
533
+ "undies",
534
+ "undress",
535
+ "vagina",
536
+ "vibrator",
537
+ "wank",
538
+ "wet",
539
+ "hentai",
540
+ "bdsm",
541
+ "gay",
542
+ "lesbian",
543
+ "femboy",
544
+ "ass",
545
+ ];
546
+ if (deepCheck) {
547
+ if (translatedText.text && nsfwWords.some(word => translatedText.text.includes(word))) {
548
+ return message.reply("Warning ⚠️. Your prompt contains **`NSFW/Illegal/Prohibited`** words. Please refrain from doing this.");
549
+ }
82
550
 
83
- } else if (imageType.validHercaiModals.includes(imageModal)) {
84
- response = await retry(() =>
85
- hercai.drawImage({
86
- model: imageModal,
87
- prompt: translatedText.text,
88
- }),
89
- );
90
- } else if (imageType.validProdiaModals.includes(imageModal)) {
91
- const generateResponse = await sdk.generate({
92
- model: imageModal,
93
- prompt: translatedText.text,
94
- negative_prompt: enhancer.negative_prompt,
95
- style_preset: enhancer.imgStyle,
96
- cfg_scale: enhancer.cfgScale,
97
- sampler: enhancer.sampler,
98
- seed: enhancer.seed,
99
- steps: enhancer.steps,
100
- width: enhancer.width,
101
- height: enhancer.height
102
- });
551
+ if (textToDraw && nsfwWords.some(word => textToDraw.includes(word))) {
552
+ return message.reply("Warning ⚠️. Your prompt contains **`NSFW/Illegal/Prohibited`** words. Please refrain from doing this.");
553
+ }
554
+ }
103
555
 
104
- await message.channel?.sendTyping();
556
+ for (let i = 0; i < numOfImages; i++) {
557
+ let response: any;
105
558
 
559
+ try {
560
+ if (imageModal === 'prodia-v2') {
561
+ response = await retry(() => hercai.betaDrawImage({ prompt: translatedText.text, ...enhancer }));
562
+ } else if (imageType.validHercaiModels.includes(imageModal)) {
563
+ response = await retry(() => hercai.drawImage({ model: imageModal, prompt: translatedText.text }));
564
+ } else if (imageType.validProdiaModels.includes(imageModal)) {
565
+ sdk.auth(imageAPIS?.prodiaAPI);
566
+ const generateResponse = await sdk.generate({ model: imageModal, prompt: translatedText.text, ...enhancer });
106
567
  const generatedJobId = generateResponse.data.job;
107
568
  response = await checkJobStatus(generatedJobId);
108
569
  } else if (imageType.validSXDL.includes(imageModal)) {
109
-
110
- const generateResponse = await sdk.sdxlGenerate({
111
- model: imageModal,
112
- prompt: translatedText.text,
113
- negative_prompt: enhancer.negative_prompt,
114
- style_preset: enhancer.imgStyle,
115
- cfg_scale: enhancer.cfgScale,
116
- sampler: enhancer.sampler,
117
- seed: enhancer.seed,
118
- steps: enhancer.steps,
119
- width: enhancer.width,
120
- height: enhancer.height
121
- });
122
-
123
- await message.channel?.sendTyping();
124
-
570
+ sdk.auth(imageAPIS?.prodiaAPI);
571
+ const generateResponse = await sdk.sdxlGenerate({ model: imageModal, prompt: translatedText.text, ...enhancer });
125
572
  const generatedJobId = generateResponse.data.job;
126
573
  response = await checkJobStatus(generatedJobId);
127
- } else if (imageModal === 'flux') {
128
- const re = await flux(translatedText.text);
129
- if (response !== null) response = re;
130
- if (response === null) throw new Error('This modal got broke please inform the owner directly!')
131
- } else if (imageModal === 'cartoon') {
132
- const re = await cartoon(translatedText.text);
133
- if (response !== null) response = re;
134
- if (response === null) throw new Error('This modal got broke please inform the owner directly!')
135
- } else {
574
+ } else if (imageModal === 'flux-schnell') {
575
+ response = await flux(translatedText.text, imageAPIS?.freesedGPTApi as any);
576
+ } else if (imageModal === 'real-cartoon-xl-v6') {
577
+ response = await cartoon(translatedText.text, imageAPIS?.freesedGPTApi as any );
578
+ } else if (imageModal === 'dalle') {
579
+ response = await rsnAPI({ API_KEY: imageAPIS?.rsnAPI, prompt: translatedText.text, apiName: 'dalle' });
580
+ } else {
136
581
  throw new Error("Invalid modal name.");
137
582
  }
138
- } catch (error: any) {
139
- if (error.response && error.response.status === 429) {
140
- console.error("Too many requests. Please try again later.");
141
- return message.reply(`Please wait i am in a cool down for a minute`);
142
- } else if (error.response && error.response.status === 500) {
143
- console.error("Internal server error. Please try again later.");
144
- return message.reply(`Please wait i am in a cool down for a minute`);
145
- } else {
146
- await message.reply(`Please wait i am in a cool down for a minute`);
147
- throw new Error("Error processing message in file");
583
+
584
+ if (!response || response === 'This Modal is Currently Under Maintenance.') {
585
+ throw new Error('Model under maintenance.');
148
586
  }
587
+ } catch (error) {
588
+ console.error(error);
589
+ return message.reply(`Please wait, I am in cooldown for a minute.`);
149
590
  }
150
- let buffferedImage: any;
151
-
152
- if (imageModal === "v3") {
153
- const res = await retry(() =>
154
- axios.get(response.url, {
155
- responseType: "arraybuffer",
156
- }),
157
- );
158
591
 
159
- await message.channel?.sendTyping();
592
+ const imageUrl = response?.url || response;
160
593
 
161
- buffferedImage = Buffer.from(res.data, "binary");
162
-
163
- const resizedImage = await sharp(buffferedImage)
164
- .resize({
165
- width: 2048,
166
- height: 2048,
167
- fit: 'cover',
168
- })
169
- .sharpen({
170
- sigma: 2,
171
- m1: 1.5,
172
- m2: 3,
173
- y2: 20,
174
- x1: 1,
175
- })
176
- .toBuffer();
177
-
178
- const attachment = {
179
- file: resizedImage,
180
- name: `image_${_0x4d7fb6 + 1}.png`,
181
- } as AttachmentData;
182
-
183
- attachData.push(attachment);
184
-
185
- const urlButton = new ButtonBuilder()
186
- .setStyle(ButtonStyle.Link)
187
- .setLabel(`Image ${_0x4d7fb6 + 1}`)
188
- .setURL(response.url);
189
-
190
- buttonsRow1.push(urlButton);
191
-
192
- imageUrls.push(response.url);
193
- } else {
194
- const imageUrl = response.url || response;
195
-
196
- await message.channel?.sendTyping();
197
-
198
- const nsfwWords: string[] = [
199
- "2g1c",
200
- "2 girls 1 cup",
201
- "acrotomophilia",
202
- "alabama hot pocket",
203
- "alaskan pipeline",
204
- "anal",
205
- "anilingus",
206
- "anus",
207
- "apeshit",
208
- "arsehole",
209
- "ass",
210
- "asshole",
211
- "assmunch",
212
- "auto erotic",
213
- "autoerotic",
214
- "babeland",
215
- "baby batter",
216
- "baby juice",
217
- "ball gag",
218
- "ball gravy",
219
- "ball kicking",
220
- "ball licking",
221
- "ball sack",
222
- "ball sucking",
223
- "bangbros",
224
- "bangbus",
225
- "bareback",
226
- "barely legal",
227
- "barenaked",
228
- "bastard",
229
- "bastardo",
230
- "bastinado",
231
- "bbw",
232
- "bdsm",
233
- "beaner",
234
- "beaners",
235
- "beaver cleaver",
236
- "beaver lips",
237
- "beastiality",
238
- "bestiality",
239
- "big black",
240
- "big breasts",
241
- "big knockers",
242
- "big tits",
243
- "bimbos",
244
- "birdlock",
245
- "bitch",
246
- "bitches",
247
- "black cock",
248
- "blonde action",
249
- "blonde on blonde action",
250
- "blowjob",
251
- "blow job",
252
- "blow your load",
253
- "blue waffle",
254
- "blumpkin",
255
- "bollocks",
256
- "bondage",
257
- "boner",
258
- "boob",
259
- "boobs",
260
- "booty call",
261
- "brown showers",
262
- "brunette action",
263
- "bukkake",
264
- "bulldyke",
265
- "bullet vibe",
266
- "bullshit",
267
- "bung hole",
268
- "bunghole",
269
- "busty",
270
- "butt",
271
- "buttcheeks",
272
- "butthole",
273
- "camel toe",
274
- "camgirl",
275
- "camslut",
276
- "camwhore",
277
- "carpet muncher",
278
- "carpetmuncher",
279
- "chocolate rosebuds",
280
- "cialis",
281
- "circlejerk",
282
- "cleveland steamer",
283
- "clit",
284
- "clitoris",
285
- "clover clamps",
286
- "clusterfuck",
287
- "cock",
288
- "cocks",
289
- "coprolagnia",
290
- "coprophilia",
291
- "cornhole",
292
- "coon",
293
- "coons",
294
- "creampie",
295
- "cum",
296
- "cumming",
297
- "cumshot",
298
- "cumshots",
299
- "cunnilingus",
300
- "cunt",
301
- "darkie",
302
- "date rape",
303
- "daterape",
304
- "deep throat",
305
- "deepthroat",
306
- "dendrophilia",
307
- "dick",
308
- "dildo",
309
- "dingleberry",
310
- "dingleberries",
311
- "dirty pillows",
312
- "dirty sanchez",
313
- "doggie style",
314
- "doggiestyle",
315
- "doggy style",
316
- "doggystyle",
317
- "dog style",
318
- "dolcett",
319
- "domination",
320
- "dominatrix",
321
- "dommes",
322
- "donkey punch",
323
- "double dong",
324
- "double penetration",
325
- "dp action",
326
- "dry hump",
327
- "dvda",
328
- "eat my ass",
329
- "ecchi",
330
- "ejaculation",
331
- "erotic",
332
- "erotism",
333
- "escort",
334
- "eunuch",
335
- "fag",
336
- "faggot",
337
- "fecal",
338
- "felch",
339
- "fellatio",
340
- "feltch",
341
- "female squirting",
342
- "femdom",
343
- "figging",
344
- "fingerbang",
345
- "fingering",
346
- "fisting",
347
- "foot fetish",
348
- "footjob",
349
- "frotting",
350
- "fuck",
351
- "fuck buttons",
352
- "fuckin",
353
- "fucking",
354
- "fucktards",
355
- "fudge packer",
356
- "fudgepacker",
357
- "futanari",
358
- "gangbang",
359
- "gang bang",
360
- "gay sex",
361
- "genitals",
362
- "giant cock",
363
- "girl on",
364
- "girl on top",
365
- "girls gone wild",
366
- "goatcx",
367
- "goatse",
368
- "god damn",
369
- "gokkun",
370
- "golden shower",
371
- "goodpoop",
372
- "goo girl",
373
- "goregasm",
374
- "grope",
375
- "group sex",
376
- "g-spot",
377
- "guro",
378
- "hand job",
379
- "handjob",
380
- "hard core",
381
- "hardcore",
382
- "hentai",
383
- "homoerotic",
384
- "honkey",
385
- "hooker",
386
- "horny",
387
- "hot carl",
388
- "hot chick",
389
- "how to kill",
390
- "how to murder",
391
- "huge fat",
392
- "humping",
393
- "incest",
394
- "intercourse",
395
- "jack off",
396
- "jail bait",
397
- "jailbait",
398
- "jelly donut",
399
- "jerk off",
400
- "jigaboo",
401
- "jiggaboo",
402
- "jiggerboo",
403
- "jizz",
404
- "juggs",
405
- "kike",
406
- "kinbaku",
407
- "kinkster",
408
- "kinky",
409
- "knobbing",
410
- "leather restraint",
411
- "leather straight jacket",
412
- "lemon party",
413
- "livesex",
414
- "lolita",
415
- "lovemaking",
416
- "make me come",
417
- "male squirting",
418
- "masturbate",
419
- "masturbating",
420
- "masturbation",
421
- "menage a trois",
422
- "milf",
423
- "missionary position",
424
- "mong",
425
- "motherfucker",
426
- "mound of venus",
427
- "mr hands",
428
- "muff diver",
429
- "muffdiving",
430
- "nambla",
431
- "nawashi",
432
- "negro",
433
- "neonazi",
434
- "nigga",
435
- "nigger",
436
- "nig nog",
437
- "nimphomania",
438
- "nipple",
439
- "nipples",
440
- "nsfw",
441
- 'nsfw images',
442
- "nude",
443
- "nudity",
444
- "nutten",
445
- "nympho",
446
- "nymphomania",
447
- "octopussy",
448
- "omorashi",
449
- "one cup two girls",
450
- 'one guy one jar',
451
- "orgasm",
452
- "orgy",
453
- 'paedophile',
454
- "paki",
455
- "panties",
456
- "panty",
457
- "pedobear",
458
- "pedophile",
459
- 'pegging',
460
- 'penis',
461
- "phone sex",
462
- 'piece of shit',
463
- "pikey",
464
- "pissing",
465
- "piss pig",
466
- "pisspig",
467
- "playboy",
468
- "pleasure chest",
469
- "pole smoker",
470
- "ponyplay",
471
- "poof",
472
- "poon",
473
- "poontang",
474
- "punany",
475
- "poop chute",
476
- "poopchute",
477
- "porn",
478
- "porno",
479
- "pornography",
480
- "prince albert piercing",
481
- "pthc",
482
- "pubes",
483
- "pussy",
484
- "queaf",
485
- "queef",
486
- "quim",
487
- "raghead",
488
- "raging boner",
489
- "rape",
490
- "raping",
491
- "rapist",
492
- "rectum",
493
- "reverse cowgirl",
494
- "rimjob",
495
- "rimming",
496
- "rosy palm",
497
- "rosy palm and her 5 sisters",
498
- "rusty trombone",
499
- "sadism",
500
- "santorum",
501
- "scat",
502
- "schlong",
503
- "scissoring",
504
- "semen",
505
- "sex",
506
- "sexcam",
507
- "sexo",
508
- "sexy",
509
- "sexual",
510
- "sexually",
511
- "sexuality",
512
- "shaved beaver",
513
- "shaved pussy",
514
- "shemale",
515
- "shibari",
516
- "shit",
517
- "shitblimp",
518
- "shitty",
519
- "shota",
520
- "shrimping",
521
- "skeet",
522
- "slanteye",
523
- "slut",
524
- "s&m",
525
- "smut",
526
- "snatch",
527
- "snowballing",
528
- "sodomize",
529
- "sodomy",
530
- "spastic",
531
- "spic",
532
- "splooge",
533
- "splooge moose",
534
- "spooge",
535
- "spread legs",
536
- "spunk",
537
- "strap on",
538
- "strapon",
539
- "strappado",
540
- "strip club",
541
- "style doggy",
542
- "suck",
543
- "sucks",
544
- "suicide girls",
545
- "sultry women",
546
- "swastika",
547
- "swinger",
548
- "tainted love",
549
- "taste my",
550
- "tea bagging",
551
- "threesome",
552
- "throating",
553
- "thumbzilla",
554
- "tied up",
555
- "tight white",
556
- "tit",
557
- "tits",
558
- "titties",
559
- "titty",
560
- "topless",
561
- "tosser",
562
- "towelhead",
563
- "tranny",
564
- "tribadism",
565
- "tub girl",
566
- 'tubgirl',
567
- "tushy",
568
- "twat",
569
- "twink",
570
- "twinkie",
571
- "two girls one cup",
572
- "undressing",
573
- 'upskirt',
574
- "urethra play",
575
- "urophilia",
576
- "vagina",
577
- "venus mound",
578
- "viagra",
579
- "vibrator",
580
- "violet wand",
581
- "vorarephilia",
582
- "voyeur",
583
- "voyeurweb",
584
- "voyuer",
585
- "vulva",
586
- "wank",
587
- "wetback",
588
- "wet dream",
589
- "white power",
590
- "whore",
591
- "worldsex",
592
- "wrapping men",
593
- "wrinkled starfish",
594
- "xx",
595
- "xxx",
596
- "yaoi",
597
- "yellow showers",
598
- "yiffy",
599
- "zoophilia",
600
- "anal",
601
- "arousal",
602
- "balls",
603
- "blowjob",
604
- "busty",
605
- "butt",
606
- "cameltoe",
607
- "climax",
608
- "clitoris",
609
- "cock",
610
- "crotch",
611
- "cum",
612
- "cumshot",
613
- "cunnilingus",
614
- "dirty",
615
- "dirtytalk",
616
- "dildo",
617
- "erect",
618
- "erogenous",
619
- "escort",
620
- "explicit",
621
- "facial",
622
- "fetish",
623
- "flirt",
624
- "foreplay",
625
- "genitals",
626
- "groin",
627
- "hardcore",
628
- "hardon",
629
- "horniness",
630
- "horny",
631
- "kamasutra",
632
- "kinky",
633
- "lewd",
634
- "lingerie",
635
- "lust",
636
- "lustful",
637
- "masturbate",
638
- "mature",
639
- "milf",
640
- "naughty",
641
- "naked",
642
- "nipples",
643
- "nude",
644
- "obscene",
645
- "oral",
646
- "orgasm",
647
- "penetration",
648
- "penis",
649
- "pleasure",
650
- "porn",
651
- "prostitute",
652
- "provocative",
653
- "pubic",
654
- "pussy",
655
- "seduce",
656
- "seductive",
657
- "sensual",
658
- "sex",
659
- "sexual",
660
- "sperm",
661
- "strip",
662
- "striptease",
663
- "swinger",
664
- "testicles",
665
- "thong",
666
- "threesome",
667
- "undies",
668
- "undress",
669
- "vagina",
670
- "vibrator",
671
- "wank",
672
- "wet",
673
- "hentai",
674
- "bdsm",
675
- "gay",
676
- "lesbian",
677
- "femboy",
678
- "ass",
679
- ];
680
-
681
-
682
-
683
- if (deepCheck) {
684
- if (translatedText.text && nsfwWords.some(word => translatedText.text.includes(word))) {
685
- return message.reply("Warning ⚠️. Your prompt contains **`NSFW/Illegal/Prohibited`** words. Please refrain from doing this.");
686
- }
687
-
688
- if (textToDraw && nsfwWords.some(word => textToDraw.includes(word))) {
689
- return message.reply("Warning ⚠️. Your prompt contains **`NSFW/Illegal/Prohibited`** words. Please refrain from doing this.");
690
- }
691
- }
692
-
693
594
  if (nsfw) {
694
- const textToCheck = await attemptImageCaptioning(imageUrl);
695
-
595
+ const textToCheck = await groqAnalyzer({ imgURL: imageUrl, prompt: textToDraw });
596
+
696
597
  if (textToCheck && nsfwWords.some(word => textToCheck.includes(word))) {
697
- return message.reply("Warning ⚠️. Your prompt contains **`NSFW/Illegal/Prohibited`** words. Please refrain from doing this.");
598
+ return message.reply("Warning ⚠️. Your prompt contains **`NSFW/Illegal/Prohibited`** content. Please refrain from this.");
698
599
  }
699
600
 
700
- if (nsfwKeyWords.length > 0) {
701
-
702
- if (textToCheck && nsfwKeyWords.some(word => textToCheck.includes(word))) {
703
- return message.reply("Warning ⚠️. The generated image contatining nsfw content. Turn off nsfw to send nsfw images.");
704
- }
705
-
706
-
601
+ if (nsfwKeyWords.length > 0 && textToCheck && nsfwKeyWords.some(word => textToCheck.includes(word))) {
602
+ return message.reply("Warning ⚠️. The generated image contains NSFW content. Disable NSFW filter to proceed.");
707
603
  }
708
604
  }
709
605
 
606
+ if (imageModal === "v3") {
607
+ const res = await retry(() => axios.get(response.url, { responseType: "arraybuffer" }));
608
+ const buffferedImage = Buffer.from(res.data, "binary");
710
609
 
711
- const attach = new AttachmentBuilder(
712
- imageUrl,
713
- { name: `image_${_0x4d7fb6 + 1}.png` },
714
- ) as AttachmentData;
715
-
716
- attachData.push(attach);
717
-
718
- const urlButton = new ButtonBuilder()
719
- .setStyle(ButtonStyle.Link)
720
- .setLabel(`Image ${_0x4d7fb6 + 1}`)
721
- .setURL(imageUrl);
722
-
723
- buttonsRow1.push(urlButton);
610
+ const resizedImage = await sharp(buffferedImage)
611
+ .resize({ width: 2048, height: 2048, fit: 'cover' })
612
+ .sharpen({ sigma: 1, m1: 5, m2: 2 })
613
+ .toBuffer();
724
614
 
615
+ const attach = new AttachmentBuilder(resizedImage, { name: `image_${i + 1}.png` });
616
+ attachData.push(attach as any);
617
+ } else {
618
+ const attach = new AttachmentBuilder(imageUrl, { name: `image_${i + 1}.png` });
619
+ attachData.push(attach as any);
725
620
  imageUrls.push(imageUrl);
726
621
  }
727
622
 
728
- await new Promise((resolve) => setTimeout(resolve, 0x7d0));
729
- }
730
-
731
- const selectMenu = new StringSelectMenuBuilder()
732
- .setCustomId("image_processing_select")
733
- .setPlaceholder("Select Image Process");
734
-
735
- const options = [
736
- "Resizing",
737
- "Color Filters",
738
- "Convert Image Extension",
739
- "Brightness",
740
- "Sepia",
741
- "Pixelate",
742
- "Blur",
743
- "Fade",
744
- "Opaque",
745
- "Grayscale",
746
- "Contrast",
747
- ];
748
-
749
- options.forEach((option, index) => {
750
- const selectOption = new StringSelectMenuOptionBuilder()
751
- .setLabel(option)
752
- .setValue(`process_${index + 1}`);
753
-
754
- selectMenu.addOptions(selectOption);
755
- });
623
+ const urlButton = new ButtonBuilder()
624
+ .setStyle(ButtonStyle.Link)
625
+ .setLabel(`Image ${i + 1}`)
626
+ .setURL(imageUrl);
756
627
 
757
- await message.channel?.sendTyping();
758
-
759
- const row1 = new ActionRowBuilder().addComponents(
760
- ...buttonsRow1,
761
- );
762
- const row2 = new ActionRowBuilder().addComponents(selectMenu);
763
-
764
- if (enhancer && enhancer.enhanceModal) {
765
- for (const imageUrl of imageUrls) {
766
- try {
628
+ buttonsRow1.push(urlButton);
629
+ }
767
630
 
768
- if (!imageType.validEnhancers?.includes(enhancer.enhanceModal)) {
769
- return await message.reply({ content: `Invalid enhancer modal (~~${enhancer.enhanceModal}~~). Please check documentation online at apexifyjs.jedi-studio.com.`})
770
- }
631
+ const row1 = new ActionRowBuilder().addComponents(...buttonsRow1);
632
+ const row2 = new ActionRowBuilder().addComponents(new StringSelectMenuBuilder().setCustomId("image_processing_select").setPlaceholder("Select Image Process").addOptions([
633
+ "Resizing", "Color Filters", "Convert Image Extension", "Brightness", "Sepia", "Pixelate", "Blur", "Fade", "Opaque", "Grayscale", "Contrast"
634
+ ].map((option, index) => new StringSelectMenuOptionBuilder().setLabel(option).setValue(`process_${index + 1}`))));
771
635
 
772
- const generateResponse = await sdk.upscale({
773
- resize: enhancer.upscale,
774
- model: enhancer.enhanceModal,
775
- imageUrl,
776
- });
777
-
778
- await message.channel?.sendTyping();
779
-
780
- const generatedJobId = generateResponse.data.job;
781
- const enhancedImageUrl = await checkJobStatus(generatedJobId);
782
-
783
- if (enhancedImageUrl) {
784
- attachData.push(new AttachmentBuilder(
785
- enhancedImageUrl,
786
- { name: `enhanced_image_${imageUrls.indexOf(imageUrl) + 1}.png` },
787
- ) as AttachmentData);
788
- }
789
- } catch (error) {
790
- console.error(`Error enhancing image at URL ${imageUrl}:`, error);
791
- }
792
- }
793
- }
794
- const allRows = [...buttons, row1, row2]
795
636
  RespondMessage = await message.reply({
796
637
  files: attachData,
797
- components: allRows,
798
- allowedMentions: { repliedUser: false },
638
+ components: [...buttons, row1, row2],
639
+ allowedMentions: { repliedUser: false }
799
640
  });
800
641
 
801
642
  return { imageUrls, RespondMessage };
802
643
  } catch (error: any) {
803
644
  console.error("Error in drawImage:", error.message);
804
- if (error.response) {
805
- console.error("Status code:", error.response.status);
806
- console.error("Response data:", error.response.data);
807
- }
808
- message.reply({
809
- content: "An error occurred while processing the images.",
810
- allowedMentions: { repliedUser: false },
811
- });
812
645
  return { imageUrls: [], RespondMessage };
813
646
  }
814
647
  }
815
648
 
816
- async function checkJobStatus(jobId: number | string | any) {
649
+ async function checkJobStatus(jobId: string) {
817
650
  try {
818
651
  const getJobResponse = await sdk.getJob({ jobId });
819
652
  const jobData = getJobResponse.data;
653
+
820
654
  if (jobData.status === "generating" || jobData.status === "queued") {
821
655
  await new Promise((resolve) => setTimeout(resolve, 3000));
822
656
  return checkJobStatus(jobId);
@@ -827,59 +661,9 @@ async function checkJobStatus(jobId: number | string | any) {
827
661
  return null;
828
662
  }
829
663
  } catch (error) {
830
- console.error(error);
831
- return null;
832
- }
833
- }
834
-
835
- async function attemptImageCaptioning(imageUrl: string) {
836
- try {
837
- let retryCount = 0;
838
- const maxRetries = 3;
839
-
840
- const fetchData = async () => {
841
- try {
842
- const response = await axios.post(
843
- `https://api-inference.huggingface.co/models/Salesforce/blip-image-captioning-base`,
844
- { image: imageUrl },
845
- {
846
- headers: {
847
- "Content-Type": "application/json",
848
- Authorization: `Bearer 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`,
849
- },
850
- },
851
- );
852
-
853
- if (response.status === 200) {
854
- return response.data[0].generated_text;
855
- } else {
856
- console.error(
857
- `Failed to fetch image captioning API: ${response.statusText}`,
858
- );
859
- return null;
860
- }
861
- } catch (error: any) {
862
- console.error(`Error fetching data: ${error.message}`);
863
- throw error;
864
- }
865
- };
866
-
867
- while (retryCount < maxRetries) {
868
- try {
869
- return await fetchData();
870
- } catch (error: any) {
871
- console.error(
872
- `Error fetching data (Retry ${retryCount + 1}): ${error.message}`,
873
- );
874
- retryCount++;
875
- }
876
- }
877
-
878
- return null;
879
- } catch (error: any) {
880
- console.error(`Error in attemptImageCaptioning: ${error.message}`);
664
+ console.error("Error fetching job status:", error);
881
665
  return null;
882
666
  }
883
667
  }
884
668
 
885
- export { aiImagine };
669
+ export { aiImagine };