if (interaction.customId === "roam") {
const rarity = randomm(1, 100);
if (rarity >= 60) {
const roamembed = new EmbedBuilder()
.setTitle("Roaming")
.setDescription("You haven't found anything yet");
console.log("found nothing");
await interaction.message.edit({ embeds: [roamembed] });
} else if (rarity >= 40) {
const mobs = $Var.mobs;
const snakeembed = new EmbedBuilder()
.setTitle(`Target Found: ${mobs.mob1.name}`)
.setDescription(
`
Level Recommended: 1-15
*Rewards*
- Jol ${mobs.mob1.rewards.jol}
- Exp ${mobs.mob1.rewards.Exp}
- Drops ${mobs.mob1.rewards.drops}
`
)
.setThumbnail(mobs.mob1.image);
// Create action row with both buttons
const actionRow = new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setCustomId("roam")
.setLabel("ROAM")
.setStyle(ButtonStyle.Primary),
new ButtonBuilder()
.setCustomId("fight")
.setLabel("FIGHT")
.setStyle(ButtonStyle.Danger)
);
console.log("found Snake");
await interaction.message.edit({
embeds: [snakeembed],
components: [actionRow],
});
}
}
if (interaction.customId === "roam") {
const rarity = randomm(1, 100);
if (rarity >= 60) {
const roamembed = new EmbedBuilder()
.setTitle("Roaming")
.setDescription("You haven't found anything yet");
console.log("found nothing");
await interaction.message.edit({ embeds: [roamembed] });
} else if (rarity >= 40) {
const mobs = $Var.mobs;
const snakeembed = new EmbedBuilder()
.setTitle(`Target Found: ${mobs.mob1.name}`)
.setDescription(
`
Level Recommended: 1-15
*Rewards*
- Jol ${mobs.mob1.rewards.jol}
- Exp ${mobs.mob1.rewards.Exp}
- Drops ${mobs.mob1.rewards.drops}
`
)
.setThumbnail(mobs.mob1.image);
// Create action row with both buttons
const actionRow = new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setCustomId("roam")
.setLabel("ROAM")
.setStyle(ButtonStyle.Primary),
new ButtonBuilder()
.setCustomId("fight")
.setLabel("FIGHT")
.setStyle(ButtonStyle.Danger)
);
console.log("found Snake");
await interaction.message.edit({
embeds: [snakeembed],
components: [actionRow],
});
}
}