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

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

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

revision 194 by rakin, Mon Jul 29 17:28:58 2024 UTC revision 336 by rakin, Mon Jul 29 17:29:36 2024 UTC
# Line 1  Line 1 
1  import { BanOptions, CommandInteraction, GuildMember, Interaction, Message, User } from 'discord.js';  import { BanOptions, CommandInteraction, GuildMember, Interaction, Message, User, Permissions } 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 13  import { hasPermission, shouldNotModerat Line 13  import { hasPermission, shouldNotModerat
13    
14  export default class MassBanCommand extends BaseCommand {  export default class MassBanCommand extends BaseCommand {
15      supportsInteractions: boolean = true;      supportsInteractions: boolean = true;
16        
17        permissions = [Permissions.FLAGS.BAN_MEMBERS];
18    
19      constructor() {      constructor() {
20          super('massban', 'moderation', []);          super('massban', 'moderation', []);
# Line 128  export default class MassBanCommand exte Line 130  export default class MassBanCommand exte
130                          guild_id: msg.guild!.id,                          guild_id: msg.guild!.id,
131                          mod_id: msg.member!.user.id,                          mod_id: msg.member!.user.id,
132                          mod_tag: (msg.member!.user as User).tag,                          mod_tag: (msg.member!.user as User).tag,
133                          reason: banOptions.reason ?? undefined                          reason: banOptions.reason ?? undefined,
134                            createdAt: new Date()
135                      });                      });
136    
137                      await msg.guild!.bans.create(user, banOptions);                      await msg.guild!.bans.create(user, banOptions);

Legend:
Removed from v.194  
changed lines
  Added in v.336

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26