add global command to guilds/debug global commands

This commit is contained in:
SowinskiBraeden committed 2022-09-01 15:33:14 -07:00
1 parent 261c2c60a3
commit 3ec70dcd54
5 files changed
+12 -15

No files matched your search

+8 -11
View File
@@ -62,11 +62,12 @@ module.exports = {
);
let Embed = new EmbedBuilder()
.setTitle('Commands')
.setColor(client.config.Colors.Default)
.setDescription(`${Commands.join("\n")}
QuarksBot Version: v${client.config.Version}`);
if (!args[0].options[0]) return interaction.send(Embed);
if (!args[0].options[0]) return interaction.send({ embeds: [Embed] });
else {
let cmd =
client.commands.get(args[0].options[0].value) ||
@@ -100,19 +101,15 @@ module.exports = {
}
}
embed.setDescription(description);
} else {
embed.addField(
"Usage",
`\`/${cmd.name}\`${cmd.usage ? " " + cmd.usage : ""}`,
true
)
}
} else embed.addFields({ name: "Usage", value: `\`/${cmd.name}\`${cmd.usage ? " " + cmd.usage : ""}`, inline: true })
return interaction.send(embed);
return interaction.send({ embeds: [embed] });
}
} else if (args[0].name == 'settings') {
const userID = client.exists(interaction.user) ? interaction.user.id : interaction.member.user.id;
let settingsMenu = new SelectMenuBuilder()
.setCustomId(`settingSelect-${interaction.member.user.id}`)
.setCustomId(`settingSelect-${userID}`)
.setPlaceholder('Select Setting you require help with')
settings.settings.map((setting) => {
@@ -125,7 +122,7 @@ module.exports = {
const SelectSettings = new ActionRowBuilder().addComponents(settingsMenu);
interaction.send({ components: [SelectSettings], flags: (1 << 6) });
interaction.send({ components: [SelectSettings], ...(!client.exists(interaction.user) && {flags: (1 << 6)}) }); // Only show ephemeral in guild
} else if (args[0].name == 'support') {
const supportEmbed = new EmbedBuilder()
+1 -1
View File
@@ -1,7 +1,7 @@
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, SelectMenuBuilder } = require('discord.js');
const { Inventory, addInventory } = require('../structures/inventory');
const getActions = ['pick up', 'grab', 'get', 'aquire', 'obtain', 'gain', 'take possesssion of'];
const getActions = ['pick up', 'grab', 'get', 'aquire', 'obtain', 'gain', 'take possesssion of', 'retrieve'];
module.exports = {
name: "inventory",
+1 -1
View File
@@ -1,6 +1,6 @@
module.exports = {
Dev: "PROD.",
Version: "12.3.2",
Version: "12.4.1",
Admins: ["362791661274660874", "329371697570381824"], // Admins of the bot
DefaultPrefix: "?",
ServerID: "955668596745461830",
+1 -1
View File
@@ -1,7 +1,7 @@
const { EmbedBuilder } = require("discord.js");
const settings = require('../config/settingsHelp');
const dropActions = ['ditch', 'drop', 'forget', 'throw out', 'leave', 'set down', 'let go of'];
const dropActions = ['ditch', 'drop', 'forget', 'throw out', 'leave', 'set down', 'let go of', 'discard'];
module.exports = async (client, interaction) => {
if (interaction.isCommand()) return;
+1 -1
View File
@@ -19,7 +19,7 @@ module.exports = {
for (const file of commandFiles) {
const command = require(`../commands/${file}`);
if (!command.global) commands.push(command);
commands.push(command); // Include global commands in guild
}
const rest = new REST({ version: '10' }).setToken(client.config.Token);