NoMoreAcronyms/commands/listPhrases.cjs

15 lines
577 B
JavaScript

2023-04-04 17:20:28 +07:00
const { codeBlock } = require("discord.js");
2023-04-01 11:29:41 +07:00
const { SlashCommandBuilder, Discord } = require('discord.js');
var abbreviationKey = require("../abbreviation_key.json");
module.exports = {
data: new SlashCommandBuilder()
.setName('list_phrases')
.setDescription('Lists phrases in target phrases.'),
2023-04-04 17:20:28 +07:00
async execute(interaction, client) {
2023-04-01 11:29:41 +07:00
await interaction.reply("Here are the current phrases in the phrase list:" + codeBlock("json", JSON.stringify(abbreviationKey.target_phrases, null, " ")));
2023-04-04 17:20:28 +07:00
console.log("User " + interaction.user.tag + " ran /list_phrases");
2023-04-01 11:29:41 +07:00
},
};