Files
Emmelia-Link-Flayer-Rewrite/commands/food.js
2023-02-25 03:25:07 -05:00

32 lines
869 B
JavaScript

const libCore = require("../libCore.js");
const { SlashCommandBuilder } = require('discord.js');
const { DebugBuilder } = require("../utilities/debugBuilder");
const log = new DebugBuilder("server", "food");
module.exports = {
data: new SlashCommandBuilder()
.setName('food')
.setDescription('Gets a random recipe and gives it to you'),
example: "food",
isPrivileged: false,
requiresTokens: false,
async execute(interaction) {
try {
var resultArray = await libCore.getFood();
await interaction.reply(`
[**${resultArray.strMeal}** - *${resultArray.strCategory}*]
${resultArray.strSource}
${resultArray.strMealThumb}
`);
}catch(err){
log.ERROR(err)
//await interaction.reply(err.toString());
}
}
};