/[sudobot]/trunk/src/commands/moderation/EchoCommand.ts
ViewVC logotype

Diff of /trunk/src/commands/moderation/EchoCommand.ts

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

revision 257 by rakin, Mon Jul 29 17:29:14 2024 UTC revision 344 by rakin, Mon Jul 29 17:29:40 2024 UTC
# Line 1  Line 1 
1  import { BanOptions, CommandInteraction, EmojiIdentifierResolvable, GuildMember, Interaction, Message, Permissions, TextChannel, User } from 'discord.js';  import { CommandInteraction, EmojiIdentifierResolvable, FileOptions, Message, TextChannel } from 'discord.js';
2  import BaseCommand from '../../utils/structures/BaseCommand';  import BaseCommand from '../../utils/structures/BaseCommand';
3  import DiscordClient from '../../client/Client';  import DiscordClient from '../../client/Client';
4  import CommandOptions from '../../types/CommandOptions';  import CommandOptions from '../../types/CommandOptions';
5  import InteractionOptions from '../../types/InteractionOptions';  import InteractionOptions from '../../types/InteractionOptions';
6  import MessageEmbed from '../../client/MessageEmbed';  import MessageEmbed from '../../client/MessageEmbed';
 import getUser from '../../utils/getUser';  
 import getMember from '../../utils/getMember';  
 import History from '../../automod/History';  
7  import { fetchEmoji } from '../../utils/Emoji';  import { fetchEmoji } from '../../utils/Emoji';
8  import { parseEmbedsInString } from '../../utils/util';  import { parseEmbedsInString } from '../../utils/util';
9    
# Line 64  export default class EchoCommand extends Line 61  export default class EchoCommand extends
61              await channel.send({              await channel.send({
62                  content: parsedContent.trim() === '' ? undefined : parsedContent,                  content: parsedContent.trim() === '' ? undefined : parsedContent,
63                  embeds,                  embeds,
64                  attachments: msg instanceof CommandInteraction ? undefined : [...msg.attachments.values()]                  files: msg instanceof CommandInteraction ? undefined : [...msg.attachments.map(a => ({
65                        attachment: a.proxyURL,
66                        description: a.description,
67                        name: a.name
68                    } as FileOptions)).values()]
69              });              });
70    
71              if (options.isInteraction) {              if (options.isInteraction) {

Legend:
Removed from v.257  
changed lines
  Added in v.344

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26