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

Contents of /trunk/src/commands/moderation/AntijoinCommand.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 225 - (show annotations)
Mon Jul 29 17:29:06 2024 UTC (8 months, 1 week ago) by rakin
File MIME type: application/typescript
File size: 959 byte(s)
feat: add anti-join systems
1 import { CommandInteraction, GuildMember, Interaction, Message } from 'discord.js';
2 import BaseCommand from '../../utils/structures/BaseCommand';
3 import DiscordClient from '../../client/Client';
4 import CommandOptions from '../../types/CommandOptions';
5 import InteractionOptions from '../../types/InteractionOptions';
6 import MessageEmbed from '../../client/MessageEmbed';
7
8 export default class AntijoinCommand extends BaseCommand {
9 supportsInteractions: boolean = true;
10
11 constructor() {
12 super('antijoin', 'moderation', []);
13 }
14
15 async run(client: DiscordClient, message: Message | CommandInteraction, options: CommandOptions | InteractionOptions) {
16 client.antijoin.toggle();
17
18 await message.reply({
19 embeds: [
20 new MessageEmbed({
21 description: 'Antijoin system was ' + (client.antijoin.enabled ? 'enabled' : 'disabled') + '.'
22 })
23 ]
24 });
25 }
26 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26