Compare commits
No commits in common. "6902a10a9752f14905bfd2e7cd57ca9cff982a73" and "18607ba90eb512e183e51cccf5748513216c031a" have entirely different histories.
6902a10a97
...
18607ba90e
4 changed files with 8 additions and 9 deletions
|
@ -8,7 +8,7 @@ export default {
|
||||||
option.setName('something')
|
option.setName('something')
|
||||||
.setDescription('🤫')
|
.setDescription('🤫')
|
||||||
.setRequired(true)),
|
.setRequired(true)),
|
||||||
category: 'secret',
|
category: 'fun',
|
||||||
async execute(interaction, args) {
|
async execute(interaction, args) {
|
||||||
const command = args[0];
|
const command = args[0];
|
||||||
|
|
|
@ -24,7 +24,6 @@ export default {
|
||||||
.setDescription('Compress the video?')
|
.setDescription('Compress the video?')
|
||||||
.setRequired(false)),
|
.setRequired(false)),
|
||||||
category: 'utility',
|
category: 'utility',
|
||||||
alias: ['dl'],
|
|
||||||
|
|
||||||
async execute(interaction, args, c) {
|
async execute(interaction, args, c) {
|
||||||
client = c;
|
client = c;
|
||||||
|
|
|
@ -20,8 +20,10 @@ export default {
|
||||||
}, command.data);
|
}, command.data);
|
||||||
|
|
||||||
const usage = command.data.options.map(cmd => {
|
const usage = command.data.options.map(cmd => {
|
||||||
|
console.log(cmd);
|
||||||
let type = 'String';
|
let type = 'String';
|
||||||
const constructorName = cmd.constructor.name.toLowerCase();
|
const constructorName = cmd.constructor.name.toLowerCase();
|
||||||
|
console.log(constructorName);
|
||||||
if (constructorName.includes('boolean')) {
|
if (constructorName.includes('boolean')) {
|
||||||
type = 'True/False';
|
type = 'True/False';
|
||||||
}
|
}
|
||||||
|
@ -51,18 +53,17 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (command.alias) {
|
if (command.alias) {
|
||||||
console.log(command.alias.length);
|
if (command.alias.length > 1) {
|
||||||
if (command.alias.length >= 1) {
|
embed.addField({ name: 'Aliases', value: `\`${command.alias.join('` `')}\``, inline: true });
|
||||||
embed.addFields({ name: 'Aliases', value: `\`${command.alias.join('` `')}\``, inline: true });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (command.userPermissions) {
|
if (command.userPermissions) {
|
||||||
embed.addFields({ name: 'User permission', value: `\`${command.userPermissions.join('` `')}\``, inline: true });
|
embed.addField({ name: 'User permission', value: `\`${command.userPermissions.join('` `')}\``, inline: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (command.clientPermissions) {
|
if (command.clientPermissions) {
|
||||||
embed.addFields({ name: 'Bot permission', value: `\`${command.clientPermissions.join('` `')}\``, inline: true });
|
embed.addField({ name: 'Bot permission', value: `\`${command.clientPermissions.join('` `')}\``, inline: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fs.existsSync(`./asset/img/command/${command.category}/${command.data.name}.png`)) {
|
if (fs.existsSync(`./asset/img/command/${command.category}/${command.data.name}.png`)) {
|
||||||
|
@ -79,7 +80,6 @@ export default {
|
||||||
|
|
||||||
const object = { };
|
const object = { };
|
||||||
for (const command of client.commands.values()) {
|
for (const command of client.commands.values()) {
|
||||||
if (command.category === 'secret') continue;
|
|
||||||
if (object[command.category]) {
|
if (object[command.category]) {
|
||||||
object[command.category].push(command.data.name);
|
object[command.category].push(command.data.name);
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const category in object) {
|
for (const category in object) {
|
||||||
|
console.log(category);
|
||||||
let title;
|
let title;
|
||||||
if (interaction.user.id == ownerId) {
|
if (interaction.user.id == ownerId) {
|
||||||
title = {
|
title = {
|
||||||
|
|
1
index.js
1
index.js
|
@ -18,7 +18,6 @@ const client = new Client({
|
||||||
// Load commands
|
// Load commands
|
||||||
client.commands = new Collection();
|
client.commands = new Collection();
|
||||||
await loadCommandFromDir('fun');
|
await loadCommandFromDir('fun');
|
||||||
await loadCommandFromDir('secret');
|
|
||||||
await loadCommandFromDir('utility');
|
await loadCommandFromDir('utility');
|
||||||
await loadCommandFromDir('admin');
|
await loadCommandFromDir('admin');
|
||||||
await loadCommandFromDir('owner');
|
await loadCommandFromDir('owner');
|
||||||
|
|
Loading…
Reference in a new issue