@@ -16,53 +16,42 @@ module.exports = {
16
16
run : async ( client , interaction , args ) => {
17
17
await interaction . deferReply ( )
18
18
const prompt = interaction . options . getString ( "prompt" )
19
- const Replicate = ( await import ( "replicate" ) ) . default
19
+ const Replicate = require ( 'replicate' )
20
+ //const Replicate = (await import("replicate")).default
20
21
21
22
const replicate = new Replicate ( {
22
23
auth : config . API ,
23
24
} ) ;
24
25
25
- const output = await
26
- replicate . run ( "prompthero/openjourney:9936c2001faa2194a261c01381f90e65261879985476014a0a37a334593a05eb" , {
26
+ const output = await replicate . run ( "prompthero/openjourney:9936c2001faa2194a261c01381f90e65261879985476014a0a37a334593a05eb" , {
27
27
input : {
28
28
prompt : prompt
29
29
}
30
30
} )
31
-
32
- if ( interaction . channel . nsfw === true ) {
31
+
32
+ console . log ( )
33
33
34
34
const row = new ActionRowBuilder ( )
35
35
. addComponents (
36
36
new ButtonBuilder ( )
37
37
. setLabel ( `Download` )
38
38
. setStyle ( ButtonStyle . Link )
39
- . setURL ( output )
40
- . setEmoji ( '1083007659457912852' ) ,
39
+ . setURL ( `${ output } ` ) ,
41
40
new ButtonBuilder ( )
42
41
. setLabel ( `Support Us` )
43
42
. setStyle ( ButtonStyle . Link )
44
- . setURL ( 'https://paypal.me/officialrazer' )
45
- . setEmoji ( '1083016028369453199' ) )
43
+ . setURL ( 'https://paypal.me/officialrazer' ) )
46
44
47
45
const embed = new EmbedBuilder ( )
48
46
. setTitle ( "**Your Prompt:**" )
49
47
. setDescription ( `**${ prompt } **` )
50
- . setImage ( output )
48
+ . setImage ( ` ${ output } ` )
51
49
. setColor ( '#2f3136' )
52
50
. setFooter ( { text : `Requested by: ${ interaction . user . username } | ©️ Project Razer ` ,
53
51
iconURL : interaction . user . displayAvatarURL ( { dynamic : true } ) ,
54
52
} )
55
53
56
54
await interaction . editReply ( { embeds : [ embed ] , components : [ row ] } )
57
55
58
- } else {
59
-
60
- const nsfw = new EmbedBuilder ( )
61
- . setTitle ( 'Warning' )
62
- . setDescription ( '\`\`\`fix\n[ Must be a Age Restricted channel to function ]\n\`\`\`' )
63
- . setColor ( '#2f3136' )
64
-
65
- await interaction . editReply ( { embeds : [ nsfw ] } )
66
- }
67
56
}
68
57
}
0 commit comments