Skip to content

Commit e97475c

Browse files
Update imagine.js
String error fixed
1 parent 2b7a097 commit e97475c

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

src/slashCommands/information/imagine.js

+8-19
Original file line numberDiff line numberDiff line change
@@ -16,53 +16,42 @@ module.exports = {
1616
run: async (client, interaction, args) => {
1717
await interaction.deferReply()
1818
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
2021

2122
const replicate = new Replicate({
2223
auth: config.API,
2324
});
2425

25-
const output = await
26-
replicate.run("prompthero/openjourney:9936c2001faa2194a261c01381f90e65261879985476014a0a37a334593a05eb", {
26+
const output = await replicate.run("prompthero/openjourney:9936c2001faa2194a261c01381f90e65261879985476014a0a37a334593a05eb", {
2727
input: {
2828
prompt: prompt
2929
}
3030
})
31-
32-
if (interaction.channel.nsfw === true) {
31+
32+
console.log()
3333

3434
const row = new ActionRowBuilder()
3535
.addComponents(
3636
new ButtonBuilder()
3737
.setLabel(`Download`)
3838
.setStyle(ButtonStyle.Link)
39-
.setURL(output)
40-
.setEmoji('1083007659457912852'),
39+
.setURL(`${output}`),
4140
new ButtonBuilder()
4241
.setLabel(`Support Us`)
4342
.setStyle(ButtonStyle.Link)
44-
.setURL('https://paypal.me/officialrazer')
45-
.setEmoji('1083016028369453199'))
43+
.setURL('https://paypal.me/officialrazer'))
4644

4745
const embed = new EmbedBuilder()
4846
.setTitle("**Your Prompt:**")
4947
.setDescription(`**${prompt}**`)
50-
.setImage(output)
48+
.setImage(`${output}`)
5149
.setColor('#2f3136')
5250
.setFooter({ text: `Requested by: ${interaction.user.username} | ©️ Project Razer `,
5351
iconURL: interaction.user.displayAvatarURL({ dynamic: true }),
5452
})
5553

5654
await interaction.editReply({ embeds: [embed], components: [row] })
5755

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-
}
6756
}
6857
}

0 commit comments

Comments
 (0)