4 |
import InteractionOptions from '../../types/InteractionOptions'; |
import InteractionOptions from '../../types/InteractionOptions'; |
5 |
import MessageEmbed from '../../client/MessageEmbed'; |
import MessageEmbed from '../../client/MessageEmbed'; |
6 |
|
|
7 |
export default class EmbedCommand extends BaseCommand { |
export default class EmbedSendCommand extends BaseCommand { |
8 |
supportsInteractions: boolean = true; |
supportsInteractions: boolean = false; |
9 |
supportsLegacy: boolean = false; |
supportsLegacy: boolean = false; |
10 |
|
supportsContextMenu: boolean = false; |
11 |
|
|
12 |
constructor() { |
constructor() { |
13 |
super('embed', 'automation', []); |
super('embed__send', 'automation', []); |
14 |
} |
} |
15 |
|
|
16 |
async run(client: DiscordClient, interaction: CommandInteraction, options: InteractionOptions) { |
async run(client: DiscordClient, interaction: CommandInteraction, options: InteractionOptions) { |
43 |
image: getString('image') ? { |
image: getString('image') ? { |
44 |
url: getString('image') |
url: getString('image') |
45 |
} : undefined, |
} : undefined, |
46 |
|
video: getString('video') ? { |
47 |
|
url: getString('video') |
48 |
|
} : undefined, |
49 |
footer: footer.text ? footer : undefined, |
footer: footer.text ? footer : undefined, |
50 |
color: (getString('color') ?? '#007bff') as ColorResolvable, |
color: (getString('color') ?? '#007bff') as ColorResolvable, |
51 |
timestamp: getString('timestamp') ? (getString('timestamp') === 'current' ? new Date() : new Date(getString('timestamp')!)) : undefined, |
timestamp: getString('timestamp') ? (getString('timestamp') === 'current' ? new Date() : new Date(getString('timestamp')!)) : undefined, |
57 |
value: value.trim(), |
value: value.trim(), |
58 |
}; |
}; |
59 |
}) : [], |
}) : [], |
60 |
url: getString('url') |
url: getString('url'), |
61 |
}); |
}); |
62 |
|
|
63 |
try { |
try { |