aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-25 23:47:40 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-25 23:47:40 -0500
commit840cca672d681c36f980a06fb79a4e2c01bd69ac (patch)
tree82c40a7fe3e1a2bc6367fed6e3d26b6c7dceb256 /src/commands/moderation
parent6ca99336a416389dd2b0b8c4c6a7b2ef87bc9fef (diff)
downloadtanzanite-840cca672d681c36f980a06fb79a4e2c01bd69ac.tar.gz
tanzanite-840cca672d681c36f980a06fb79a4e2c01bd69ac.tar.bz2
tanzanite-840cca672d681c36f980a06fb79a4e2c01bd69ac.zip
I love breaking changes!!!!
Diffstat (limited to 'src/commands/moderation')
-rw-r--r--src/commands/moderation/evidence.ts9
-rw-r--r--src/commands/moderation/lockdown.ts10
-rw-r--r--src/commands/moderation/modlog.ts4
-rw-r--r--src/commands/moderation/slowmode.ts2
-rw-r--r--src/commands/moderation/unlockdown.ts10
5 files changed, 24 insertions, 11 deletions
diff --git a/src/commands/moderation/evidence.ts b/src/commands/moderation/evidence.ts
index 155d804..84138f6 100644
--- a/src/commands/moderation/evidence.ts
+++ b/src/commands/moderation/evidence.ts
@@ -1,5 +1,6 @@
import { BushCommand, ModLog, type BushMessage, type BushSlashMessage } from '#lib';
-import { type ArgumentOptions, type Flag } from 'discord-akairo';
+import { ArgumentGeneratorReturn } from 'discord-akairo';
+import { ArgumentTypeCasterReturn } from 'discord-akairo/dist/src/struct/commands/arguments/Argument';
import { ApplicationCommandOptionType, Permissions } from 'discord.js';
export default class EvidenceCommand extends BushCommand {
@@ -35,8 +36,8 @@ export default class EvidenceCommand extends BushCommand {
});
}
- override *args(message: BushMessage): IterableIterator<ArgumentOptions | Flag> {
- const case_id = yield {
+ override *args(message: BushMessage): ArgumentGeneratorReturn {
+ const case_id: ArgumentTypeCasterReturn<'string'> = yield {
id: 'case_id',
type: 'string',
prompt: {
@@ -46,7 +47,7 @@ export default class EvidenceCommand extends BushCommand {
}
};
- const evidence = yield {
+ const evidence: ArgumentTypeCasterReturn<'string'> = yield {
id: 'evidence',
type: 'string',
match: 'restContent',
diff --git a/src/commands/moderation/lockdown.ts b/src/commands/moderation/lockdown.ts
index 350ce26..ea7c08b 100644
--- a/src/commands/moderation/lockdown.ts
+++ b/src/commands/moderation/lockdown.ts
@@ -11,7 +11,7 @@ import {
type OptionalArgType
} from '#lib';
import assert from 'assert';
-import { ApplicationCommandOptionType, Collection, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, ChannelType, Collection, Permissions } from 'discord.js';
export default class LockdownCommand extends BushCommand {
public constructor() {
@@ -28,7 +28,13 @@ export default class LockdownCommand extends BushCommand {
type: util.arg.union('textChannel', 'newsChannel', 'threadChannel'),
prompt: 'What channel would you like to lockdown?',
slashType: ApplicationCommandOptionType.Channel,
- channelTypes: ['GuildText', 'GuildNews', 'GuildNewsThread', 'GuildPublicThread', 'GuildPrivateThread'],
+ channelTypes: [
+ ChannelType.GuildText,
+ ChannelType.GuildNews,
+ ChannelType.GuildNewsThread,
+ ChannelType.GuildPublicThread,
+ ChannelType.GuildPrivateThread
+ ],
optional: true
},
{
diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts
index e7b3576..d6ecc37 100644
--- a/src/commands/moderation/modlog.ts
+++ b/src/commands/moderation/modlog.ts
@@ -1,5 +1,5 @@
import { BushCommand, ButtonPaginator, ModLog, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
-import { ApplicationCommandOptionType, MessageEmbed, Permissions, User } from 'discord.js';
+import { ApplicationCommandOptionType, Embed, Permissions, User } from 'discord.js';
export default class ModlogCommand extends BushCommand {
public constructor() {
@@ -57,7 +57,7 @@ export default class ModlogCommand extends BushCommand {
const chunked: string[][] = util.chunk(niceLogs, 4);
const embedPages = chunked.map(
(chunk) =>
- new MessageEmbed({
+ new Embed({
title: `${foundUser.tag}'s Mod Logs`,
description: chunk.join('\n━━━━━━━━━━━━━━━\n'),
color: util.colors.default
diff --git a/src/commands/moderation/slowmode.ts b/src/commands/moderation/slowmode.ts
index a724006..96c3881 100644
--- a/src/commands/moderation/slowmode.ts
+++ b/src/commands/moderation/slowmode.ts
@@ -29,7 +29,7 @@ export default class SlowmodeCommand extends BushCommand {
retry: '{error} Choose a valid channel.',
optional: true,
slashType: ApplicationCommandOptionType.Channel,
- channelTypes: ['GuildText', 'GuildPrivateThread', 'GuildPublicThread']
+ channelTypes: [ChannelType.GuildText, ChannelType.GuildPrivateThread, ChannelType.GuildPublicThread]
}
],
slash: true,
diff --git a/src/commands/moderation/unlockdown.ts b/src/commands/moderation/unlockdown.ts
index d7ba5ee..ea36b67 100644
--- a/src/commands/moderation/unlockdown.ts
+++ b/src/commands/moderation/unlockdown.ts
@@ -1,6 +1,6 @@
import { LockdownCommand } from '#commands';
import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage, type OptionalArgType } from '#lib';
-import { ApplicationCommandOptionType, Permissions } from 'discord.js';
+import { ApplicationCommandOptionType, ChannelType, Permissions } from 'discord.js';
export default class UnlockdownCommand extends BushCommand {
public constructor() {
@@ -17,7 +17,13 @@ export default class UnlockdownCommand extends BushCommand {
type: util.arg.union('textChannel', 'newsChannel', 'threadChannel'),
prompt: 'What channel would you like to unlockdown?',
slashType: ApplicationCommandOptionType.Channel,
- channelTypes: ['GuildText', 'GuildNews', 'GuildNewsThread', 'GuildPublicThread', 'GuildPrivateThread'],
+ channelTypes: [
+ ChannelType.GuildText,
+ ChannelType.GuildNews,
+ ChannelType.GuildNewsThread,
+ ChannelType.GuildPublicThread,
+ ChannelType.GuildPrivateThread
+ ],
optional: true
},
{