From ff5bff89ee7792419b7676cdeabb8ec1fffc22b1 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sun, 26 Feb 2023 22:07:33 -0500 Subject: [PATCH] Remove unused commands --- commands/food.js | 31 ------------------------------- commands/quotes.js | 26 -------------------------- commands/slang.js | 29 ----------------------------- 3 files changed, 86 deletions(-) delete mode 100644 commands/food.js delete mode 100644 commands/quotes.js delete mode 100644 commands/slang.js diff --git a/commands/food.js b/commands/food.js deleted file mode 100644 index b5b9c7a..0000000 --- a/commands/food.js +++ /dev/null @@ -1,31 +0,0 @@ -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()); - } - } -}; diff --git a/commands/quotes.js b/commands/quotes.js deleted file mode 100644 index 1735311..0000000 --- a/commands/quotes.js +++ /dev/null @@ -1,26 +0,0 @@ -var libCore = require("../libCore.js"); -const quote_url = "https://zenquotes.io/api/quotes/"; - -const { SlashCommandBuilder } = require('discord.js'); -const { DebugBuilder } = require("../utilities/debugBuilder"); -const log = new DebugBuilder("server", "quotes"); - -module.exports = { - data: new SlashCommandBuilder() - .setName('quote') - .setDescription('Get a random quote'), - example: "quote", - isPrivileged: false, - requiresTokens: false, - async execute(interaction) { - try { - var quotes = await libCore.getQuotes(quote_url); - var selectedQuote = Math.floor(Math.random() * quotes.length); - - interaction.reply(quotes[selectedQuote].quoteText + " - " + quotes[selectedQuote].quoteAuthor); - } catch(err){ - log.ERROR(err) - //await interaction.reply(err.toString()); - } - } -}; \ No newline at end of file diff --git a/commands/slang.js b/commands/slang.js deleted file mode 100644 index 38a18d5..0000000 --- a/commands/slang.js +++ /dev/null @@ -1,29 +0,0 @@ -var libCore = require("../libCore.js"); - -const { SlashCommandBuilder } = require('discord.js'); -const { DebugBuilder } = require("../utilities/debugBuilder"); -const log = new DebugBuilder("server", "slang"); - -module.exports = { - data: new SlashCommandBuilder() - .setName('slang') - .setDescription('Search Urban Dictionary for a phrase.') - .addStringOption(option => - option.setName('phrase') - .setDescription('The phrase to search') - .setRequired(true)), - example: "slang \"[phrase to search]\"", - isPrivileged: false, - requiresTokens: false, - async execute(interaction) { - try{ - var question = encodeURIComponent(interaction.options.getString('phrase').join(" ")); - - var slangData = await libCore.getSlang(question); - await interaction.reply(`**Term**: ${decodeURIComponent(question)}\n\n**Answer**: ${slangData.definition}\n\n**Example**: ${slangData.example}`); - }catch(err){ - log.ERROR(err) - //await interaction.reply(err.toString()); - } - } -}; \ No newline at end of file