Initial Emmelia merge

This commit is contained in:
Logan Cusano
2023-05-06 14:56:51 -04:00
parent 6e8af5dbcc
commit f3a4f25f85
44 changed files with 5530 additions and 1115 deletions

View File

@@ -0,0 +1,27 @@
var libCore = require("../libCore.js");
const { SlashCommandBuilder } = require('discord.js');
const { DebugBuilder } = require("../utilities/debugBuilder");
const log = new DebugBuilder("server", "categories");
module.exports = {
data: new SlashCommandBuilder()
.setName('categories')
.setDescription('Return all categories'),
example: "categories",
isPrivileged: false,
async execute(interaction) {
await libCore.getCategories(async (err, categoryResults) => {
if (err) throw err;
log.DEBUG("Returned Categories: ", categoryResults);
var categories = [];
for (const record of categoryResults) {
categories.push(record.category);
}
await interaction.reply(
`Categories: [${categories}]`
);
});
}
};