/[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 51 by rakin, Mon Jul 29 17:28:23 2024 UTC revision 206 by rakin, Mon Jul 29 17:29:01 2024 UTC
# Line 1  Line 1 
1  import { BanOptions, CommandInteraction, EmojiIdentifierResolvable, GuildMember, Interaction, Message, TextChannel, User } from 'discord.js';  import { BanOptions, CommandInteraction, EmojiIdentifierResolvable, GuildMember, Interaction, Message, Permissions, TextChannel, User } 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';
# Line 11  import { fetchEmoji } from '../../utils/ Line 11  import { fetchEmoji } from '../../utils/
11    
12  export default class EchoCommand extends BaseCommand {  export default class EchoCommand extends BaseCommand {
13      supportsInteractions: boolean = true;      supportsInteractions: boolean = true;
14        permissions = [Permissions.FLAGS.MANAGE_MESSAGES];
15    
16      constructor() {      constructor() {
17          super('echo', 'moderation', []);          super('echo', 'moderation', []);
# Line 47  export default class EchoCommand extends Line 48  export default class EchoCommand extends
48    
49              content = await options.args.join(' ');              content = await options.args.join(' ');
50          }          }
51            
52            if (!channel.send) {
53                await msg.reply({
54                    content: 'Invalid text channel.',
55                    ephemeral: true
56                });
57    
58                return;
59            }
60    
61          try {          try {
62              await channel.send({              await channel.send({

Legend:
Removed from v.51  
changed lines
  Added in v.206

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26