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

Diff of /trunk/src/commands/moderation/SendCommand.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, TextChannel, User } from 'discord.js';  import { CommandInteraction, EmojiIdentifierResolvable, FileOptions, GuildMember, Message } 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';  
7  import getMember from '../../utils/getMember';  import getMember from '../../utils/getMember';
 import History from '../../automod/History';  
8  import { fetchEmoji } from '../../utils/Emoji';  import { fetchEmoji } from '../../utils/Emoji';
9  import { parseEmbedsInString } from '../../utils/util';  import { parseEmbedsInString } from '../../utils/util';
10    
# Line 62  export default class SendCommand extends Line 60  export default class SendCommand extends
60              await member.send({              await member.send({
61                  content: parsedContent.trim() === '' ? undefined : parsedContent,                  content: parsedContent.trim() === '' ? undefined : parsedContent,
62                  embeds,                  embeds,
63                  attachments: msg instanceof CommandInteraction ? undefined : [...msg.attachments.values()]                  files: msg instanceof CommandInteraction ? undefined : [...msg.attachments.map(a => ({
64                        attachment: a.proxyURL,
65                        description: a.description,
66                        name: a.name
67                    } as FileOptions)).values()]
68              });              });
69    
70              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