nyx/unused/commands/Config/cmd-list.js

21 lines
640 B
JavaScript
Raw Normal View History

2021-06-12 12:53:51 +02:00
const schema = require("../../models/custom-commands");
2022-10-26 12:38:28 +02:00
const { EmbedBuilder } = require("discord.js");
2021-06-12 12:53:51 +02:00
module.exports = {
2022-10-26 12:38:28 +02:00
name: "cc-list",
UserPerm: "ADMINISTRATOR",
description: "Check the custom commands in a server",
category: "Config",
run: async (client, message, args) => {
const data = await schema.find({ Guild: message.guild.id });
if (!!data === false) return client.err(messgae, "Config", "cmd-list", 10);
message.channel.send(
new EmbedBuilder()
.setColor(client.color)
.setDescription(
data.map((cmd, i) => `${i + 1}: ${cmd.Command}`).join("\n")
)
);
},
2021-06-12 12:53:51 +02:00
};