add global command to guilds/debug global commands
This commit is contained in:
5 files changed
+12
-15
No files matched your search
+8
-11
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user