/[sudobot]/trunk/src/commands/automation/EmbedSendCommand.ts
ViewVC logotype

Diff of /trunk/src/commands/automation/EmbedSendCommand.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/src/commands/automation/EmbedCommand.ts revision 248 by rakin, Mon Jul 29 17:29:12 2024 UTC trunk/src/commands/automation/EmbedSendCommand.ts revision 249 by rakin, Mon Jul 29 17:29:12 2024 UTC
# Line 4  import DiscordClient from '../../client/ Line 4  import DiscordClient from '../../client/
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) {
# Line 42  export default class EmbedCommand extend Line 43  export default class EmbedCommand extend
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,
# Line 53  export default class EmbedCommand extend Line 57  export default class EmbedCommand extend
57                      value: value.trim(),                      value: value.trim(),
58                  };                  };
59              }) : [],              }) : [],
60              url: getString('url')              url: getString('url'),
61          });          });
62    
63          try {          try {

Legend:
Removed from v.248  
changed lines
  Added in v.249

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26