Updated for slash commands

This commit is contained in:
Noah committed 2021-10-23 20:04:02 -05:00
1 parent 654064d7c5
commit 33e4d97be5
8 files changed
+834 -613

No files matched your search

+16 -19
View File
@@ -4,9 +4,9 @@
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
const cmdconfig = yaml.load(fs.readFileSync('./Data/commands.yml', 'utf8'));
const yaml = require("js-yaml");
const supportbot = yaml.load(fs.readFileSync("./Data/supportbot.yml", "utf8"));
const cmdconfig = yaml.load(fs.readFileSync("./Data/commands.yml", "utf8"));
// Your Addon Config file! Saved in /Addons/Settings/YourAddonConig.yml
// const exampleaddon = yaml.load(fs.readFileSync('./Addons/Settings/YourAddonConig.yml', 'utf8'));
@@ -14,21 +14,18 @@ const cmdconfig = yaml.load(fs.readFileSync('./Data/commands.yml', 'utf8'));
const Command = require("../Structures/Command.js");
module.exports = new Command({
name: "hello",
description: "hello",
type: "BOTH",
slashCommandOptions: [],
permission: "SEND_MESSAGES",
name: "hello",
description: "hello",
slashCommandOptions: [],
permission: "SEND_MESSAGES",
async run(message, args, client) {
async run(interaction) {
const Embed = new Discord.MessageEmbed()
.setDescription("Hello World!")
.setColor(supportbot.InfoColour);
const Embed = new Discord.MessageEmbed()
.setDescription("Hello World!")
.setColor(supportbot.InfoColour)
message.channel.send({
embeds: [Embed]
})
}
});
interaction.reply({
embeds: [Embed],
});
},
});