aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation/activePunishments.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-11-28 09:27:41 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-11-28 09:27:41 -0500
commit453683b57b8ff013ff25e2aaa4aa1d2e047edcb7 (patch)
tree8b98d2f30dbb6a8448602446cfacf9091667cc33 /src/commands/moderation/activePunishments.ts
parentde4c3dcaf172804d34ae708be1ed3e75af42f4d5 (diff)
downloadtanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.tar.gz
tanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.tar.bz2
tanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.zip
a few small changes
Diffstat (limited to 'src/commands/moderation/activePunishments.ts')
-rw-r--r--src/commands/moderation/activePunishments.ts76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/commands/moderation/activePunishments.ts b/src/commands/moderation/activePunishments.ts
new file mode 100644
index 0000000..d40f2ba
--- /dev/null
+++ b/src/commands/moderation/activePunishments.ts
@@ -0,0 +1,76 @@
+// import { BushCommand, ModLog, ModLogModel, type BushGuildMember, type BushMessage, type BushSlashMessage } from '#lib';
+// import { FindOptions, Op } from 'sequelize';
+
+// const punishmentTypes = ['ban', 'kick', 'mute', 'warn', 'role'] as const;
+
+// export default class ActivePunishmentsCommand extends BushCommand {
+// public constructor() {
+// super('active-punishments', {
+// aliases: ['active-punishments', 'ap'],
+// category: 'moderation',
+// description: 'Gets a list of all the active punishment in the server.',
+// usage: [`active-punishments [--moderator <user>] [--type <${punishmentTypes.map((v) => `'${v}'`).join('|')}>]`],
+// examples: ['active-punishments'],
+// args: [
+// {
+// id: 'moderator',
+// description: 'Only show active punishments by this moderator.',
+// type: 'user',
+// match: 'option',
+// prompt: 'Only show active punishments from what user?',
+// optional: true,
+// slashType: 'USER',
+// slashResolve: 'member'
+// },
+// {
+// id: 'type',
+// description: 'Only show active punishments of this type.',
+// customType: [...punishmentTypes],
+// readableType: punishmentTypes.map((v) => `'${v}'`).join('|'),
+// match: 'option',
+// optional: true,
+// slashType: 'STRING',
+// choices: punishmentTypes.map((v) => ({ name: v, value: v }))
+// }
+// ],
+// slash: true,
+// channel: 'guild',
+// hidden: true,
+// clientPermissions: (m) => util.clientSendAndPermCheck(m),
+// userPermissions: (m) => util.userGuildPermCheck(m, ['MANAGE_MESSAGES'])
+// });
+// }
+// public override async exec(
+// message: BushMessage | BushSlashMessage,
+// args: { moderator?: BushGuildMember; type: typeof punishmentTypes[number] }
+// ) {
+// const where: FindOptions<ModLogModel>['where'] = { guild: message.guild!.id };
+// if (args.moderator?.id) where.user = args.moderator.id;
+// if (args.type) {
+// switch (args.type) {
+// case 'ban':
+// where.type = { [Op.or]: ['PERM_BAN', 'TEMP_BAN', 'UNBAN'] };
+// break;
+// case 'kick':
+// where.type = { [Op.or]: ['KICK'] };
+// break;
+// case 'mute':
+// where.type = { [Op.or]: ['PERM_MUTE', 'TEMP_MUTE', 'UNMUTE'] };
+// break;
+// case 'warn':
+// where.type = { [Op.or]: ['WARN'] };
+// break;
+// case 'role':
+// where.type = { [Op.or]: ['PERM_PUNISHMENT_ROLE', 'TEMP_PUNISHMENT_ROLE', 'REMOVE_PUNISHMENT_ROLE'] };
+// break;
+// default:
+// return message.util.reply(`${util.emojis.error} You supplied an invalid case type to filter by.`);
+// }
+// }
+
+// const logs = await ModLog.findAll({
+// where,
+// order: [['createdAt', 'ASC']]
+// });
+// }
+// }