7 |
|
|
8 |
export default class EmbedCommand extends BaseCommand { |
export default class EmbedCommand extends BaseCommand { |
9 |
supportsInteractions: boolean = true; |
supportsInteractions: boolean = true; |
|
supportsLegacy = false; |
|
10 |
subcommands = ['send', 'schema', 'build']; |
subcommands = ['send', 'schema', 'build']; |
11 |
|
|
12 |
constructor() { |
constructor() { |
25 |
} |
} |
26 |
|
|
27 |
if (!options.isInteraction && !this.subcommands.includes(options.args[0])) { |
if (!options.isInteraction && !this.subcommands.includes(options.args[0])) { |
28 |
await message.reply(`${emoji('error')} Invalid subcommand provided. Must be one of ${this.subcommands.map(c => `\`${c}\``)}.`); |
await message.reply(`${emoji('error')} Invalid subcommand provided. Must be one of ${this.subcommands.map(c => `\`${c}\``).join(', ')}.`); |
29 |
return; |
return; |
30 |
} |
} |
31 |
|
|
34 |
const command = client.commands.get('embed__' + subcommand); |
const command = client.commands.get('embed__' + subcommand); |
35 |
|
|
36 |
if (command) { |
if (command) { |
37 |
|
if (!options.isInteraction) |
38 |
|
options.args.shift(); |
39 |
await command.execute(client, message, options); |
await command.execute(client, message, options); |
40 |
} |
} |
41 |
} |
} |