forked from Supositware/Haha-Yes
added default context and moved integration types to the command
This commit is contained in:
parent
c44ae79640
commit
454f2c4296
2 changed files with 4 additions and 2 deletions
|
@ -33,6 +33,7 @@ export default {
|
||||||
.setRequired(false)),
|
.setRequired(false)),
|
||||||
category: 'utility',
|
category: 'utility',
|
||||||
alias: ['dl'],
|
alias: ['dl'],
|
||||||
|
integration_types: [0, 1],
|
||||||
|
|
||||||
async execute(interaction, args, c) {
|
async execute(interaction, args, c) {
|
||||||
client = c;
|
client = c;
|
||||||
|
|
|
@ -19,8 +19,9 @@ for (let i = 0; i < categoryPath.length; i++) {
|
||||||
const filePath = path.join(commandsPath, file);
|
const filePath = path.join(commandsPath, file);
|
||||||
const command = await import(filePath);
|
const command = await import(filePath);
|
||||||
|
|
||||||
if (command.default.data.name === 'download') {
|
if (command.default.integration_types) {
|
||||||
Object.assign(command.default.data, { integration_types: [0, 1] });
|
Object.assign(command.default.data, { integration_types: command.default.integration_types });
|
||||||
|
Object.assign(command.default.data, { contexts: [0, 1, 2] });
|
||||||
}
|
}
|
||||||
commands.push(command.default.data.toJSON());
|
commands.push(command.default.data.toJSON());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue