Fixed bug in category command
This commit is contained in:
@@ -10,10 +10,18 @@ module.exports = {
|
||||
example: "categories",
|
||||
isPrivileged: false,
|
||||
async execute(interaction) {
|
||||
var categories = libCore.getCategories();
|
||||
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.join(', ')}]`
|
||||
);
|
||||
await interaction.reply(
|
||||
`Categories: [${categories}]`
|
||||
);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user