Update commands to slash commands

This commit is contained in:
Logan Cusano
2023-02-25 03:25:07 -05:00
parent 49c80b7f5e
commit 02bf0ebda2
16 changed files with 370 additions and 223 deletions

View File

@@ -1,16 +1,23 @@
var libCore = require("../libCore.js");
module.exports = {
name: 'update',
description: 'Get RSS Source Link',
execute(message, args) {
message.reply(`Loading Feeds from Sources`);
try {
libCore.loadFeeds();
} catch (error) {
console.log(error);
}
feedArray = libCore.getFeeds();
const { SlashCommandBuilder } = require('discord.js');
const { DebugBuilder } = require("../utilities/debugBuilder");
const log = new DebugBuilder("server", "update");
}
};
module.exports = {
data: new SlashCommandBuilder()
.setName('update')
.setDescription('Reloads all RSS feeds'),
example: "update",
isPrivileged: false,
requiresTokens: false,
async execute(interaction) {
try{
libCore.loadFeeds();
await interaction.reply("Reloaded all RSS feeds");
}catch(err){
log.ERROR(err)
//await interaction.reply(err.toString());
}
}
};