apexify.js 3.3.10 → 4.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.
- package/README.md +183 -0
- package/dist/ai/ApexAI.d.ts +88 -8
- package/dist/ai/ApexAI.d.ts.map +1 -1
- package/dist/ai/ApexAI.js +61 -161
- package/dist/ai/ApexAI.js.map +1 -1
- package/dist/ai/direct-use.d.ts +9 -0
- package/dist/ai/direct-use.d.ts.map +1 -0
- package/dist/ai/direct-use.js +572 -0
- package/dist/ai/direct-use.js.map +1 -0
- package/dist/ai/functions/Gemini.d.ts +6 -0
- package/dist/ai/functions/Gemini.d.ts.map +1 -0
- package/dist/ai/functions/Gemini.js +103 -0
- package/dist/ai/functions/Gemini.js.map +1 -0
- package/dist/ai/functions/draw.d.ts +2 -1
- package/dist/ai/functions/draw.d.ts.map +1 -1
- package/dist/ai/functions/draw.js +476 -102
- package/dist/ai/functions/draw.js.map +1 -1
- package/dist/ai/functions/generateVoiceResponse.d.ts +3 -1
- package/dist/ai/functions/generateVoiceResponse.d.ts.map +1 -1
- package/dist/ai/functions/generateVoiceResponse.js +29 -18
- package/dist/ai/functions/generateVoiceResponse.js.map +1 -1
- package/dist/ai/functions/typeWriter.d.ts +1 -1
- package/dist/ai/functions/typeWriter.d.ts.map +1 -1
- package/dist/ai/functions/typeWriter.js +3 -2
- package/dist/ai/functions/typeWriter.js.map +1 -1
- package/dist/ai/functions/validOptions.d.ts +10 -0
- package/dist/ai/functions/validOptions.d.ts.map +1 -0
- package/dist/ai/functions/validOptions.js +130 -0
- package/dist/ai/functions/validOptions.js.map +1 -0
- package/dist/ai/modals-chat/Gemini-flash.d.ts +6 -0
- package/dist/ai/modals-chat/Gemini-flash.d.ts.map +1 -0
- package/dist/ai/modals-chat/Gemini-flash.js +111 -0
- package/dist/ai/modals-chat/Gemini-flash.js.map +1 -0
- package/dist/ai/modals-chat/Gemini-pro.d.ts +6 -0
- package/dist/ai/modals-chat/Gemini-pro.d.ts.map +1 -0
- package/dist/ai/modals-chat/Gemini-pro.js +96 -0
- package/dist/ai/modals-chat/Gemini-pro.js.map +1 -0
- package/dist/ai/modals-chat/apexChat.d.ts +2 -0
- package/dist/ai/modals-chat/apexChat.d.ts.map +1 -0
- package/dist/ai/modals-chat/apexChat.js +33 -0
- package/dist/ai/modals-chat/apexChat.js.map +1 -0
- package/dist/ai/modals-chat/config.d.ts +5 -0
- package/dist/ai/modals-chat/config.d.ts.map +1 -0
- package/dist/ai/modals-chat/config.js +13 -0
- package/dist/ai/modals-chat/config.js.map +1 -0
- package/dist/ai/modals-chat/facebook-ai.d.ts +2 -0
- package/dist/ai/modals-chat/facebook-ai.d.ts.map +1 -0
- package/dist/ai/modals-chat/facebook-ai.js +21 -0
- package/dist/ai/modals-chat/facebook-ai.js.map +1 -0
- package/dist/ai/modals-chat/gemma.d.ts +3 -0
- package/dist/ai/modals-chat/gemma.d.ts.map +1 -0
- package/dist/ai/modals-chat/gemma.js +54 -0
- package/dist/ai/modals-chat/gemma.js.map +1 -0
- package/dist/ai/modals-chat/modals.d.ts +8 -0
- package/dist/ai/modals-chat/modals.d.ts.map +1 -0
- package/dist/ai/modals-chat/modals.js +16 -0
- package/dist/ai/modals-chat/modals.js.map +1 -0
- package/dist/ai/modals-chat/starChat.d.ts +2 -0
- package/dist/ai/modals-chat/starChat.d.ts.map +1 -0
- package/dist/ai/modals-chat/starChat.js +32 -0
- package/dist/ai/modals-chat/starChat.js.map +1 -0
- package/dist/ai/modals-chat/yi-ai.d.ts +2 -0
- package/dist/ai/modals-chat/yi-ai.d.ts.map +1 -0
- package/dist/ai/modals-chat/yi-ai.js +41 -0
- package/dist/ai/modals-chat/yi-ai.js.map +1 -0
- package/dist/ai/utils.d.ts +3 -2
- package/dist/ai/utils.d.ts.map +1 -1
- package/dist/ai/utils.js +6 -4
- package/dist/ai/utils.js.map +1 -1
- package/dist/canvas/utils/general functions.js +1 -1
- package/dist/canvas/utils/general functions.js.map +1 -1
- package/lib/ai/ApexAI.ts +214 -224
- package/lib/ai/{models.ts → direct-use.ts} +9 -12
- package/lib/ai/functions/draw.ts +547 -149
- package/lib/ai/functions/generateVoiceResponse.ts +37 -22
- package/lib/ai/functions/typeWriter.ts +4 -2
- package/lib/ai/functions/validOptions.ts +210 -0
- package/lib/ai/modals-chat/Gemini-flash.ts +108 -0
- package/lib/ai/modals-chat/Gemini-pro.ts +93 -0
- package/lib/ai/modals-chat/apexChat.ts +31 -0
- package/lib/ai/modals-chat/config.ts +11 -0
- package/lib/ai/modals-chat/facebook-ai.ts +14 -0
- package/lib/ai/modals-chat/modals.ts +8 -0
- package/lib/ai/modals-chat/starChat.ts +31 -0
- package/lib/ai/modals-chat/yi-ai.ts +40 -0
- package/lib/ai/utils.ts +3 -1
- package/lib/canvas/utils/general functions.ts +1 -1
- package/package.json +5 -3
- package/lib/ai/functions/aivoice.ts +0 -0
package/lib/ai/functions/draw.ts
CHANGED
|
@@ -1,94 +1,25 @@
|
|
|
1
1
|
import translate from "@iamtraction/google-translate";
|
|
2
2
|
import sharp from "sharp";
|
|
3
3
|
import { ButtonBuilder, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, ButtonStyle, ActionRowBuilder, AttachmentBuilder, AttachmentData } from "discord.js";
|
|
4
|
+
import axios from "axios";
|
|
5
|
+
import { validOptions, ImageModals } from './validOptions';
|
|
4
6
|
import api from "api";
|
|
5
7
|
|
|
6
|
-
const sdk: any = api("@prodia/v1.3.0#be019b2kls0gqss3");
|
|
7
|
-
sdk.auth("43435e1c-cab1-493f-a224-f51e4b97ce8d");
|
|
8
|
-
|
|
9
|
-
const validHercaiModals = [
|
|
10
|
-
"v1",
|
|
11
|
-
"v2",
|
|
12
|
-
"v2-beta",
|
|
13
|
-
"lexica",
|
|
14
|
-
"prodia",
|
|
15
|
-
"animefy",
|
|
16
|
-
"raava",
|
|
17
|
-
"shonin",
|
|
18
|
-
"v3",
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
const validProdiaModals = [
|
|
22
|
-
"3Guofeng3_v34.safetensors [50f420de]",
|
|
23
|
-
"absolutereality_V16.safetensors [37db0fc3]",
|
|
24
|
-
"absolutereality_v181.safetensors [3d9d4d2b]",
|
|
25
|
-
"amIReal_V41.safetensors [0a8a2e61]",
|
|
26
|
-
"analog-diffusion-1.0.ckpt [9ca13f02]",
|
|
27
|
-
"anythingv3_0-pruned.ckpt [2700c435]",
|
|
28
|
-
"anything-v4.5-pruned.ckpt [65745d25]",
|
|
29
|
-
"anythingV5_PrtRE.safetensors [893e49b9]",
|
|
30
|
-
"AOM3A3_orangemixs.safetensors [9600da17]",
|
|
31
|
-
"blazing_drive_v10g.safetensors [ca1c1eab]",
|
|
32
|
-
"cetusMix_Version35.safetensors [de2f2560]",
|
|
33
|
-
"childrensStories_v13D.safetensors [9dfaabcb]",
|
|
34
|
-
"childrensStories_v1SemiReal.safetensors [a1c56dbb]",
|
|
35
|
-
"childrensStories_v1ToonAnime.safetensors [2ec7b88b]",
|
|
36
|
-
"Counterfeit_v30.safetensors [9e2a8f19]",
|
|
37
|
-
"cuteyukimixAdorable_midchapter3.safetensors [04bdffe6]",
|
|
38
|
-
"cyberrealistic_v33.safetensors [82b0d085]",
|
|
39
|
-
"dalcefo_v4.safetensors [425952fe]",
|
|
40
|
-
"deliberate_v2.safetensors [10ec4b29]",
|
|
41
|
-
"deliberate_v3.safetensors [afd9d2d4]",
|
|
42
|
-
"dreamlike-anime-1.0.safetensors [4520e090]",
|
|
43
|
-
"dreamlike-diffusion-1.0.safetensors [5c9fd6e0]",
|
|
44
|
-
"dreamlike-photoreal-2.0.safetensors [fdcf65e7]",
|
|
45
|
-
"dreamshaper_6BakedVae.safetensors [114c8abb]",
|
|
46
|
-
"dreamshaper_7.safetensors [5cf5ae06]",
|
|
47
|
-
"dreamshaper_8.safetensors [9d40847d]",
|
|
48
|
-
"edgeOfRealism_eorV20.safetensors [3ed5de15]",
|
|
49
|
-
"EimisAnimeDiffusion_V1.ckpt [4f828a15]",
|
|
50
|
-
"elldreths-vivid-mix.safetensors [342d9d26]",
|
|
51
|
-
"epicrealism_naturalSinRC1VAE.safetensors [90a4c676]",
|
|
52
|
-
"ICantBelieveItsNotPhotography_seco.safetensors [4e7a3dfd]",
|
|
53
|
-
"juggernaut_aftermath.safetensors [5e20c455]",
|
|
54
|
-
"lofi_v4.safetensors [ccc204d6]",
|
|
55
|
-
"lyriel_v16.safetensors [68fceea2]",
|
|
56
|
-
"majicmixRealistic_v4.safetensors [29d0de58]",
|
|
57
|
-
"mechamix_v10.safetensors [ee685731]",
|
|
58
|
-
"meinamix_meinaV9.safetensors [2ec66ab0]",
|
|
59
|
-
"meinamix_meinaV11.safetensors [b56ce717]",
|
|
60
|
-
"neverendingDream_v122.safetensors [f964ceeb]",
|
|
61
|
-
"openjourney_V4.ckpt [ca2f377f]",
|
|
62
|
-
"pastelMixStylizedAnime_pruned_fp16.safetensors [793a26e8]",
|
|
63
|
-
"portraitplus_V1.0.safetensors [1400e684]",
|
|
64
|
-
"protogenx34.safetensors [5896f8d5]",
|
|
65
|
-
"Realistic_Vision_V1.4-pruned-fp16.safetensors [8d21810b]",
|
|
66
|
-
"Realistic_Vision_V2.0.safetensors [79587710]",
|
|
67
|
-
"Realistic_Vision_V4.0.safetensors [29a7afaa]",
|
|
68
|
-
"Realistic_Vision_V5.0.safetensors [614d1063]",
|
|
69
|
-
"redshift_diffusion-V10.safetensors [1400e684]",
|
|
70
|
-
"revAnimated_v122.safetensors [3f4fefd9]",
|
|
71
|
-
"rundiffusionFX25D_v10.safetensors [cd12b0ee]",
|
|
72
|
-
"rundiffusionFX_v10.safetensors [cd4e694d]",
|
|
73
|
-
"sdv1_4.ckpt [7460a6fa]",
|
|
74
|
-
"v1-5-pruned-emaonly.safetensors [d7049739]",
|
|
75
|
-
"v1-5-inpainting.safetensors [21c7ab71]",
|
|
76
|
-
"shoninsBeautiful_v10.safetensors [25d8c546]",
|
|
77
|
-
"theallys-mix-ii-churned.safetensors [5d9225a4]",
|
|
78
|
-
"timeless-1.0.ckpt [7c4971d4]",
|
|
79
|
-
"toonyou_beta6.safetensors [980f6b15]",
|
|
80
|
-
];
|
|
8
|
+
const sdk: any = api("@prodia/v1.3.0#be019b2kls0gqss3");
|
|
81
9
|
async function aiImagine(
|
|
82
10
|
message: any,
|
|
83
11
|
numOfImages: number,
|
|
84
12
|
textToDraw: string,
|
|
85
13
|
hercai: any,
|
|
86
|
-
imageModel:
|
|
14
|
+
imageModel: ImageModals,
|
|
87
15
|
nsfw: boolean,
|
|
88
16
|
nsfwKeyWords: string[],
|
|
17
|
+
deepCheck: boolean,
|
|
18
|
+
enhancer: any,
|
|
19
|
+
buttons: any[]
|
|
89
20
|
) {
|
|
90
|
-
const maxRetryAttempts =
|
|
91
|
-
const retryInterval =
|
|
21
|
+
const maxRetryAttempts = 4;
|
|
22
|
+
const retryInterval = 5000;
|
|
92
23
|
let response: any;
|
|
93
24
|
async function retry(fn: any, retriesLeft = maxRetryAttempts) {
|
|
94
25
|
try {
|
|
@@ -97,6 +28,7 @@ async function aiImagine(
|
|
|
97
28
|
if (retriesLeft === 0) {
|
|
98
29
|
throw error;
|
|
99
30
|
}
|
|
31
|
+
|
|
100
32
|
await new Promise((resolve) => setTimeout(resolve, retryInterval));
|
|
101
33
|
return retry(fn, retriesLeft - 1);
|
|
102
34
|
}
|
|
@@ -124,17 +56,40 @@ async function aiImagine(
|
|
|
124
56
|
|
|
125
57
|
for (let _0x4d7fb6 = 0x0; _0x4d7fb6 < numOfImages; _0x4d7fb6++) {
|
|
126
58
|
try {
|
|
127
|
-
if (validHercaiModals.includes(imageModel)) {
|
|
59
|
+
if (validOptions.validHercaiModals.includes(imageModel)) {
|
|
128
60
|
response = await retry(() =>
|
|
129
61
|
hercai.drawImage({
|
|
130
62
|
model: imageModel,
|
|
131
63
|
prompt: translatedText.text,
|
|
132
64
|
}),
|
|
133
65
|
);
|
|
134
|
-
} else if (validProdiaModals.includes(imageModel)) {
|
|
66
|
+
} else if (validOptions.validProdiaModals.includes(imageModel)) {
|
|
135
67
|
const generateResponse = await sdk.generate({
|
|
136
68
|
model: imageModel,
|
|
137
69
|
prompt: translatedText.text,
|
|
70
|
+
negative_prompt: enhancer.negative_prompt,
|
|
71
|
+
style_preset: enhancer.imgStyle,
|
|
72
|
+
cfg_scale: enhancer.cfgScale,
|
|
73
|
+
sampler: enhancer.sampler,
|
|
74
|
+
seed: enhancer.seed,
|
|
75
|
+
steps: enhancer.steps,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
await message.channel?.sendTyping();
|
|
79
|
+
|
|
80
|
+
const generatedJobId = generateResponse.data.job;
|
|
81
|
+
response = await checkJobStatus(generatedJobId);
|
|
82
|
+
} else if (validOptions.validSXDL.includes(imageModel)) {
|
|
83
|
+
|
|
84
|
+
const generateResponse = await sdk.sdxlGenerate({
|
|
85
|
+
model: imageModel,
|
|
86
|
+
prompt: translatedText.text,
|
|
87
|
+
negative_prompt: enhancer.negative_prompt,
|
|
88
|
+
style_preset: enhancer.imgStyle,
|
|
89
|
+
cfg_scale: enhancer.cfgScale,
|
|
90
|
+
sampler: enhancer.sampler,
|
|
91
|
+
seed: enhancer.seed,
|
|
92
|
+
steps: enhancer.steps,
|
|
138
93
|
});
|
|
139
94
|
|
|
140
95
|
await message.channel?.sendTyping();
|
|
@@ -159,45 +114,38 @@ async function aiImagine(
|
|
|
159
114
|
let buffferedImage: any;
|
|
160
115
|
|
|
161
116
|
if (imageModel === "v3") {
|
|
162
|
-
const res = await retry(
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
});
|
|
169
|
-
if (!resp.ok) {
|
|
170
|
-
throw new Error("Failed to fetch image data.");
|
|
171
|
-
}
|
|
172
|
-
return await resp.arrayBuffer();
|
|
173
|
-
});
|
|
174
|
-
|
|
117
|
+
const res = await retry(() =>
|
|
118
|
+
axios.get(response.url, {
|
|
119
|
+
responseType: "arraybuffer",
|
|
120
|
+
}),
|
|
121
|
+
);
|
|
122
|
+
|
|
175
123
|
await message.channel?.sendTyping();
|
|
176
|
-
|
|
177
|
-
buffferedImage = Buffer.from(res, "binary");
|
|
178
|
-
|
|
124
|
+
|
|
125
|
+
buffferedImage = Buffer.from(res.data, "binary");
|
|
126
|
+
|
|
179
127
|
const resizedImage = await sharp(buffferedImage)
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
128
|
+
.resize({
|
|
129
|
+
width: 0x320,
|
|
130
|
+
})
|
|
131
|
+
.toBuffer();
|
|
132
|
+
|
|
185
133
|
const attachment = {
|
|
186
|
-
|
|
187
|
-
|
|
134
|
+
file: resizedImage,
|
|
135
|
+
name: `image_${_0x4d7fb6 + 1}.png`,
|
|
188
136
|
} as AttachmentData;
|
|
189
|
-
|
|
137
|
+
|
|
190
138
|
attachData.push(attachment);
|
|
191
|
-
|
|
139
|
+
|
|
192
140
|
const urlButton = new ButtonBuilder()
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
141
|
+
.setStyle(ButtonStyle.Link)
|
|
142
|
+
.setLabel(`Image ${_0x4d7fb6 + 1}`)
|
|
143
|
+
.setURL(response.url);
|
|
144
|
+
|
|
197
145
|
buttonsRow1.push(urlButton);
|
|
198
|
-
|
|
146
|
+
|
|
199
147
|
imageUrls.push(response.url);
|
|
200
|
-
|
|
148
|
+
} else {
|
|
201
149
|
const imageUrl = response.url || response;
|
|
202
150
|
|
|
203
151
|
await message.channel?.sendTyping();
|
|
@@ -206,6 +154,407 @@ async function aiImagine(
|
|
|
206
154
|
const textToCheck = await attemptImageCaptioning(imageUrl);
|
|
207
155
|
|
|
208
156
|
const nsfwWords: string[] = [
|
|
157
|
+
"2g1c",
|
|
158
|
+
"2 girls 1 cup",
|
|
159
|
+
"acrotomophilia",
|
|
160
|
+
"alabama hot pocket",
|
|
161
|
+
"alaskan pipeline",
|
|
162
|
+
"anal",
|
|
163
|
+
"anilingus",
|
|
164
|
+
"anus",
|
|
165
|
+
"apeshit",
|
|
166
|
+
"arsehole",
|
|
167
|
+
"ass",
|
|
168
|
+
"asshole",
|
|
169
|
+
"assmunch",
|
|
170
|
+
"auto erotic",
|
|
171
|
+
"autoerotic",
|
|
172
|
+
"babeland",
|
|
173
|
+
"baby batter",
|
|
174
|
+
"baby juice",
|
|
175
|
+
"ball gag",
|
|
176
|
+
"ball gravy",
|
|
177
|
+
"ball kicking",
|
|
178
|
+
"ball licking",
|
|
179
|
+
"ball sack",
|
|
180
|
+
"ball sucking",
|
|
181
|
+
"bangbros",
|
|
182
|
+
"bangbus",
|
|
183
|
+
"bareback",
|
|
184
|
+
"barely legal",
|
|
185
|
+
"barenaked",
|
|
186
|
+
"bastard",
|
|
187
|
+
"bastardo",
|
|
188
|
+
"bastinado",
|
|
189
|
+
"bbw",
|
|
190
|
+
"bdsm",
|
|
191
|
+
"beaner",
|
|
192
|
+
"beaners",
|
|
193
|
+
"beaver cleaver",
|
|
194
|
+
"beaver lips",
|
|
195
|
+
"beastiality",
|
|
196
|
+
"bestiality",
|
|
197
|
+
"big black",
|
|
198
|
+
"big breasts",
|
|
199
|
+
"big knockers",
|
|
200
|
+
"big tits",
|
|
201
|
+
"bimbos",
|
|
202
|
+
"birdlock",
|
|
203
|
+
"bitch",
|
|
204
|
+
"bitches",
|
|
205
|
+
"black cock",
|
|
206
|
+
"blonde action",
|
|
207
|
+
"blonde on blonde action",
|
|
208
|
+
"blowjob",
|
|
209
|
+
"blow job",
|
|
210
|
+
"blow your load",
|
|
211
|
+
"blue waffle",
|
|
212
|
+
"blumpkin",
|
|
213
|
+
"bollocks",
|
|
214
|
+
"bondage",
|
|
215
|
+
"boner",
|
|
216
|
+
"boob",
|
|
217
|
+
"boobs",
|
|
218
|
+
"booty call",
|
|
219
|
+
"brown showers",
|
|
220
|
+
"brunette action",
|
|
221
|
+
"bukkake",
|
|
222
|
+
"bulldyke",
|
|
223
|
+
"bullet vibe",
|
|
224
|
+
"bullshit",
|
|
225
|
+
"bung hole",
|
|
226
|
+
"bunghole",
|
|
227
|
+
"busty",
|
|
228
|
+
"butt",
|
|
229
|
+
"buttcheeks",
|
|
230
|
+
"butthole",
|
|
231
|
+
"camel toe",
|
|
232
|
+
"camgirl",
|
|
233
|
+
"camslut",
|
|
234
|
+
"camwhore",
|
|
235
|
+
"carpet muncher",
|
|
236
|
+
"carpetmuncher",
|
|
237
|
+
"chocolate rosebuds",
|
|
238
|
+
"cialis",
|
|
239
|
+
"circlejerk",
|
|
240
|
+
"cleveland steamer",
|
|
241
|
+
"clit",
|
|
242
|
+
"clitoris",
|
|
243
|
+
"clover clamps",
|
|
244
|
+
"clusterfuck",
|
|
245
|
+
"cock",
|
|
246
|
+
"cocks",
|
|
247
|
+
"coprolagnia",
|
|
248
|
+
"coprophilia",
|
|
249
|
+
"cornhole",
|
|
250
|
+
"coon",
|
|
251
|
+
"coons",
|
|
252
|
+
"creampie",
|
|
253
|
+
"cum",
|
|
254
|
+
"cumming",
|
|
255
|
+
"cumshot",
|
|
256
|
+
"cumshots",
|
|
257
|
+
"cunnilingus",
|
|
258
|
+
"cunt",
|
|
259
|
+
"darkie",
|
|
260
|
+
"date rape",
|
|
261
|
+
"daterape",
|
|
262
|
+
"deep throat",
|
|
263
|
+
"deepthroat",
|
|
264
|
+
"dendrophilia",
|
|
265
|
+
"dick",
|
|
266
|
+
"dildo",
|
|
267
|
+
"dingleberry",
|
|
268
|
+
"dingleberries",
|
|
269
|
+
"dirty pillows",
|
|
270
|
+
"dirty sanchez",
|
|
271
|
+
"doggie style",
|
|
272
|
+
"doggiestyle",
|
|
273
|
+
"doggy style",
|
|
274
|
+
"doggystyle",
|
|
275
|
+
"dog style",
|
|
276
|
+
"dolcett",
|
|
277
|
+
"domination",
|
|
278
|
+
"dominatrix",
|
|
279
|
+
"dommes",
|
|
280
|
+
"donkey punch",
|
|
281
|
+
"double dong",
|
|
282
|
+
"double penetration",
|
|
283
|
+
"dp action",
|
|
284
|
+
"dry hump",
|
|
285
|
+
"dvda",
|
|
286
|
+
"eat my ass",
|
|
287
|
+
"ecchi",
|
|
288
|
+
"ejaculation",
|
|
289
|
+
"erotic",
|
|
290
|
+
"erotism",
|
|
291
|
+
"escort",
|
|
292
|
+
"eunuch",
|
|
293
|
+
"fag",
|
|
294
|
+
"faggot",
|
|
295
|
+
"fecal",
|
|
296
|
+
"felch",
|
|
297
|
+
"fellatio",
|
|
298
|
+
"feltch",
|
|
299
|
+
"female squirting",
|
|
300
|
+
"femdom",
|
|
301
|
+
"figging",
|
|
302
|
+
"fingerbang",
|
|
303
|
+
"fingering",
|
|
304
|
+
"fisting",
|
|
305
|
+
"foot fetish",
|
|
306
|
+
"footjob",
|
|
307
|
+
"frotting",
|
|
308
|
+
"fuck",
|
|
309
|
+
"fuck buttons",
|
|
310
|
+
"fuckin",
|
|
311
|
+
"fucking",
|
|
312
|
+
"fucktards",
|
|
313
|
+
"fudge packer",
|
|
314
|
+
"fudgepacker",
|
|
315
|
+
"futanari",
|
|
316
|
+
"gangbang",
|
|
317
|
+
"gang bang",
|
|
318
|
+
"gay sex",
|
|
319
|
+
"genitals",
|
|
320
|
+
"giant cock",
|
|
321
|
+
"girl on",
|
|
322
|
+
"girl on top",
|
|
323
|
+
"girls gone wild",
|
|
324
|
+
"goatcx",
|
|
325
|
+
"goatse",
|
|
326
|
+
"god damn",
|
|
327
|
+
"gokkun",
|
|
328
|
+
"golden shower",
|
|
329
|
+
"goodpoop",
|
|
330
|
+
"goo girl",
|
|
331
|
+
"goregasm",
|
|
332
|
+
"grope",
|
|
333
|
+
"group sex",
|
|
334
|
+
"g-spot",
|
|
335
|
+
"guro",
|
|
336
|
+
"hand job",
|
|
337
|
+
"handjob",
|
|
338
|
+
"hard core",
|
|
339
|
+
"hardcore",
|
|
340
|
+
"hentai",
|
|
341
|
+
"homoerotic",
|
|
342
|
+
"honkey",
|
|
343
|
+
"hooker",
|
|
344
|
+
"horny",
|
|
345
|
+
"hot carl",
|
|
346
|
+
"hot chick",
|
|
347
|
+
"how to kill",
|
|
348
|
+
"how to murder",
|
|
349
|
+
"huge fat",
|
|
350
|
+
"humping",
|
|
351
|
+
"incest",
|
|
352
|
+
"intercourse",
|
|
353
|
+
"jack off",
|
|
354
|
+
"jail bait",
|
|
355
|
+
"jailbait",
|
|
356
|
+
"jelly donut",
|
|
357
|
+
"jerk off",
|
|
358
|
+
"jigaboo",
|
|
359
|
+
"jiggaboo",
|
|
360
|
+
"jiggerboo",
|
|
361
|
+
"jizz",
|
|
362
|
+
"juggs",
|
|
363
|
+
"kike",
|
|
364
|
+
"kinbaku",
|
|
365
|
+
"kinkster",
|
|
366
|
+
"kinky",
|
|
367
|
+
"knobbing",
|
|
368
|
+
"leather restraint",
|
|
369
|
+
"leather straight jacket",
|
|
370
|
+
"lemon party",
|
|
371
|
+
"livesex",
|
|
372
|
+
"lolita",
|
|
373
|
+
"lovemaking",
|
|
374
|
+
"make me come",
|
|
375
|
+
"male squirting",
|
|
376
|
+
"masturbate",
|
|
377
|
+
"masturbating",
|
|
378
|
+
"masturbation",
|
|
379
|
+
"menage a trois",
|
|
380
|
+
"milf",
|
|
381
|
+
"missionary position",
|
|
382
|
+
"mong",
|
|
383
|
+
"motherfucker",
|
|
384
|
+
"mound of venus",
|
|
385
|
+
"mr hands",
|
|
386
|
+
"muff diver",
|
|
387
|
+
"muffdiving",
|
|
388
|
+
"nambla",
|
|
389
|
+
"nawashi",
|
|
390
|
+
"negro",
|
|
391
|
+
"neonazi",
|
|
392
|
+
"nigga",
|
|
393
|
+
"nigger",
|
|
394
|
+
"nig nog",
|
|
395
|
+
"nimphomania",
|
|
396
|
+
"nipple",
|
|
397
|
+
"nipples",
|
|
398
|
+
"nsfw",
|
|
399
|
+
'nsfw images',
|
|
400
|
+
"nude",
|
|
401
|
+
"nudity",
|
|
402
|
+
"nutten",
|
|
403
|
+
"nympho",
|
|
404
|
+
"nymphomania",
|
|
405
|
+
"octopussy",
|
|
406
|
+
"omorashi",
|
|
407
|
+
"one cup two girls",
|
|
408
|
+
'one guy one jar',
|
|
409
|
+
"orgasm",
|
|
410
|
+
"orgy",
|
|
411
|
+
'paedophile',
|
|
412
|
+
"paki",
|
|
413
|
+
"panties",
|
|
414
|
+
"panty",
|
|
415
|
+
"pedobear",
|
|
416
|
+
"pedophile",
|
|
417
|
+
'pegging',
|
|
418
|
+
'penis',
|
|
419
|
+
"phone sex",
|
|
420
|
+
'piece of shit',
|
|
421
|
+
"pikey",
|
|
422
|
+
"pissing",
|
|
423
|
+
"piss pig",
|
|
424
|
+
"pisspig",
|
|
425
|
+
"playboy",
|
|
426
|
+
"pleasure chest",
|
|
427
|
+
"pole smoker",
|
|
428
|
+
"ponyplay",
|
|
429
|
+
"poof",
|
|
430
|
+
"poon",
|
|
431
|
+
"poontang",
|
|
432
|
+
"punany",
|
|
433
|
+
"poop chute",
|
|
434
|
+
"poopchute",
|
|
435
|
+
"porn",
|
|
436
|
+
"porno",
|
|
437
|
+
"pornography",
|
|
438
|
+
"prince albert piercing",
|
|
439
|
+
"pthc",
|
|
440
|
+
"pubes",
|
|
441
|
+
"pussy",
|
|
442
|
+
"queaf",
|
|
443
|
+
"queef",
|
|
444
|
+
"quim",
|
|
445
|
+
"raghead",
|
|
446
|
+
"raging boner",
|
|
447
|
+
"rape",
|
|
448
|
+
"raping",
|
|
449
|
+
"rapist",
|
|
450
|
+
"rectum",
|
|
451
|
+
"reverse cowgirl",
|
|
452
|
+
"rimjob",
|
|
453
|
+
"rimming",
|
|
454
|
+
"rosy palm",
|
|
455
|
+
"rosy palm and her 5 sisters",
|
|
456
|
+
"rusty trombone",
|
|
457
|
+
"sadism",
|
|
458
|
+
"santorum",
|
|
459
|
+
"scat",
|
|
460
|
+
"schlong",
|
|
461
|
+
"scissoring",
|
|
462
|
+
"semen",
|
|
463
|
+
"sex",
|
|
464
|
+
"sexcam",
|
|
465
|
+
"sexo",
|
|
466
|
+
"sexy",
|
|
467
|
+
"sexual",
|
|
468
|
+
"sexually",
|
|
469
|
+
"sexuality",
|
|
470
|
+
"shaved beaver",
|
|
471
|
+
"shaved pussy",
|
|
472
|
+
"shemale",
|
|
473
|
+
"shibari",
|
|
474
|
+
"shit",
|
|
475
|
+
"shitblimp",
|
|
476
|
+
"shitty",
|
|
477
|
+
"shota",
|
|
478
|
+
"shrimping",
|
|
479
|
+
"skeet",
|
|
480
|
+
"slanteye",
|
|
481
|
+
"slut",
|
|
482
|
+
"s&m",
|
|
483
|
+
"smut",
|
|
484
|
+
"snatch",
|
|
485
|
+
"snowballing",
|
|
486
|
+
"sodomize",
|
|
487
|
+
"sodomy",
|
|
488
|
+
"spastic",
|
|
489
|
+
"spic",
|
|
490
|
+
"splooge",
|
|
491
|
+
"splooge moose",
|
|
492
|
+
"spooge",
|
|
493
|
+
"spread legs",
|
|
494
|
+
"spunk",
|
|
495
|
+
"strap on",
|
|
496
|
+
"strapon",
|
|
497
|
+
"strappado",
|
|
498
|
+
"strip club",
|
|
499
|
+
"style doggy",
|
|
500
|
+
"suck",
|
|
501
|
+
"sucks",
|
|
502
|
+
"suicide girls",
|
|
503
|
+
"sultry women",
|
|
504
|
+
"swastika",
|
|
505
|
+
"swinger",
|
|
506
|
+
"tainted love",
|
|
507
|
+
"taste my",
|
|
508
|
+
"tea bagging",
|
|
509
|
+
"threesome",
|
|
510
|
+
"throating",
|
|
511
|
+
"thumbzilla",
|
|
512
|
+
"tied up",
|
|
513
|
+
"tight white",
|
|
514
|
+
"tit",
|
|
515
|
+
"tits",
|
|
516
|
+
"titties",
|
|
517
|
+
"titty",
|
|
518
|
+
"topless",
|
|
519
|
+
"tosser",
|
|
520
|
+
"towelhead",
|
|
521
|
+
"tranny",
|
|
522
|
+
"tribadism",
|
|
523
|
+
"tub girl",
|
|
524
|
+
'tubgirl',
|
|
525
|
+
"tushy",
|
|
526
|
+
"twat",
|
|
527
|
+
"twink",
|
|
528
|
+
"twinkie",
|
|
529
|
+
"two girls one cup",
|
|
530
|
+
"undressing",
|
|
531
|
+
'upskirt',
|
|
532
|
+
"urethra play",
|
|
533
|
+
"urophilia",
|
|
534
|
+
"vagina",
|
|
535
|
+
"venus mound",
|
|
536
|
+
"viagra",
|
|
537
|
+
"vibrator",
|
|
538
|
+
"violet wand",
|
|
539
|
+
"vorarephilia",
|
|
540
|
+
"voyeur",
|
|
541
|
+
"voyeurweb",
|
|
542
|
+
"voyuer",
|
|
543
|
+
"vulva",
|
|
544
|
+
"wank",
|
|
545
|
+
"wetback",
|
|
546
|
+
"wet dream",
|
|
547
|
+
"white power",
|
|
548
|
+
"whore",
|
|
549
|
+
"worldsex",
|
|
550
|
+
"wrapping men",
|
|
551
|
+
"wrinkled starfish",
|
|
552
|
+
"xx",
|
|
553
|
+
"xxx",
|
|
554
|
+
"yaoi",
|
|
555
|
+
"yellow showers",
|
|
556
|
+
"yiffy",
|
|
557
|
+
"zoophilia",
|
|
209
558
|
"anal",
|
|
210
559
|
"arousal",
|
|
211
560
|
"balls",
|
|
@@ -289,11 +638,22 @@ async function aiImagine(
|
|
|
289
638
|
|
|
290
639
|
if (nsfwKeyWords.length > 0) {
|
|
291
640
|
if (textToCheck && nsfwKeyWords.some(word => textToCheck?.includes(word))) {
|
|
292
|
-
return message.reply("Warning ⚠️. The generated image contatining nsfw content. Turn off nsfw to
|
|
641
|
+
return message.reply("Warning ⚠️. The generated image contatining nsfw content. Turn off nsfw to send nsfw images.");
|
|
293
642
|
}
|
|
294
643
|
}
|
|
295
|
-
|
|
296
|
-
|
|
644
|
+
|
|
645
|
+
if (deepCheck) {
|
|
646
|
+
if (translatedText.text && nsfwWords.some(word => translatedText.text?.includes(word))) {
|
|
647
|
+
return message.reply("Warning ⚠️. Your prompt contains **`NSFW/Illegal/Prohibited`** words. Please refrain from doing this.");
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
if (translatedText.text && nsfwKeyWords.some(word => translatedText.text?.includes(word))) {
|
|
651
|
+
return message.reply("Warning ⚠️. Your prompt contains **`NSFW/Illegal/Prohibited`** words. Please refrain from doing this.");
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
if (textToCheck && nsfwWords.some(word => textToCheck?.includes(word))) {
|
|
656
|
+
return message.reply("Warning ⚠️. The generated image contatining nsfw content. Turn off nsfw to send nsfw images.");
|
|
297
657
|
}
|
|
298
658
|
}
|
|
299
659
|
|
|
@@ -350,9 +710,40 @@ async function aiImagine(
|
|
|
350
710
|
);
|
|
351
711
|
const row2 = new ActionRowBuilder().addComponents(selectMenu);
|
|
352
712
|
|
|
713
|
+
if (enhancer && enhancer.enhanceModal) {
|
|
714
|
+
for (const imageUrl of imageUrls) {
|
|
715
|
+
try {
|
|
716
|
+
|
|
717
|
+
if (!validOptions.validEnhancers?.includes(enhancer.enhanceModal)) {
|
|
718
|
+
return await message.reply({ content: `Invalid enhancer modal (~~${enhancer.enhanceModal}~~). Please check documentation online at apexifyjs.jedi-studio.com.`})
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
const generateResponse = await sdk.upscale({
|
|
722
|
+
resize: 4,
|
|
723
|
+
model: enhancer.enhanceModal,
|
|
724
|
+
imageUrl,
|
|
725
|
+
});
|
|
726
|
+
|
|
727
|
+
await message.channel?.sendTyping();
|
|
728
|
+
|
|
729
|
+
const generatedJobId = generateResponse.data.job;
|
|
730
|
+
const enhancedImageUrl = await checkJobStatus(generatedJobId);
|
|
731
|
+
|
|
732
|
+
if (enhancedImageUrl) {
|
|
733
|
+
attachData.push(new AttachmentBuilder(
|
|
734
|
+
enhancedImageUrl,
|
|
735
|
+
{ name: `enhanced_image_${imageUrls.indexOf(imageUrl) + 1}.png` },
|
|
736
|
+
) as AttachmentData);
|
|
737
|
+
}
|
|
738
|
+
} catch (error) {
|
|
739
|
+
console.error(`Error enhancing image at URL ${imageUrl}:`, error);
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
const allRows = [...buttons, row1, row2]
|
|
353
744
|
await message.reply({
|
|
354
745
|
files: attachData,
|
|
355
|
-
components:
|
|
746
|
+
components: allRows,
|
|
356
747
|
allowedMentions: { repliedUser: false },
|
|
357
748
|
});
|
|
358
749
|
|
|
@@ -392,44 +783,51 @@ async function checkJobStatus(jobId: number | string | any) {
|
|
|
392
783
|
|
|
393
784
|
async function attemptImageCaptioning(imageUrl: string) {
|
|
394
785
|
try {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
const fetchData = async () => {
|
|
399
|
-
try {
|
|
400
|
-
const response = await fetch(`https://api-inference.huggingface.co/models/Salesforce/blip-image-captioning-base`, {
|
|
401
|
-
method: 'POST',
|
|
402
|
-
headers: {
|
|
403
|
-
"Content-Type": "application/json",
|
|
404
|
-
Authorization: `Bearer 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`,
|
|
405
|
-
},
|
|
406
|
-
body: JSON.stringify({ image: imageUrl })
|
|
407
|
-
});
|
|
408
|
-
|
|
409
|
-
if (response.ok) {
|
|
410
|
-
return await response.json();
|
|
411
|
-
} else {
|
|
412
|
-
console.error(`Failed to fetch image captioning API: ${response.statusText}`);
|
|
413
|
-
return null;
|
|
414
|
-
}
|
|
415
|
-
} catch (error: any) {
|
|
416
|
-
console.error(`Error fetching data: ${error.message}`);
|
|
417
|
-
throw error;
|
|
418
|
-
}
|
|
419
|
-
};
|
|
786
|
+
let retryCount = 0;
|
|
787
|
+
const maxRetries = 3;
|
|
420
788
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
789
|
+
const fetchData = async () => {
|
|
790
|
+
try {
|
|
791
|
+
const response = await axios.post(
|
|
792
|
+
`https://api-inference.huggingface.co/models/Salesforce/blip-image-captioning-base`,
|
|
793
|
+
{ image: imageUrl },
|
|
794
|
+
{
|
|
795
|
+
headers: {
|
|
796
|
+
"Content-Type": "application/json",
|
|
797
|
+
Authorization: `Bearer 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`,
|
|
798
|
+
},
|
|
799
|
+
},
|
|
800
|
+
);
|
|
801
|
+
|
|
802
|
+
if (response.status === 200) {
|
|
803
|
+
return response.data[0].generated_text;
|
|
804
|
+
} else {
|
|
805
|
+
console.error(
|
|
806
|
+
`Failed to fetch image captioning API: ${response.statusText}`,
|
|
807
|
+
);
|
|
808
|
+
return null;
|
|
809
|
+
}
|
|
810
|
+
} catch (error: any) {
|
|
811
|
+
console.error(`Error fetching data: ${error.message}`);
|
|
812
|
+
throw error;
|
|
427
813
|
}
|
|
814
|
+
};
|
|
428
815
|
|
|
429
|
-
|
|
816
|
+
while (retryCount < maxRetries) {
|
|
817
|
+
try {
|
|
818
|
+
return await fetchData();
|
|
819
|
+
} catch (error: any) {
|
|
820
|
+
console.error(
|
|
821
|
+
`Error fetching data (Retry ${retryCount + 1}): ${error.message}`,
|
|
822
|
+
);
|
|
823
|
+
retryCount++;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
return null;
|
|
430
828
|
} catch (error: any) {
|
|
431
|
-
|
|
432
|
-
|
|
829
|
+
console.error(`Error in attemptImageCaptioning: ${error.message}`);
|
|
830
|
+
return null;
|
|
433
831
|
}
|
|
434
832
|
}
|
|
435
833
|
|