aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-06-27 18:08:14 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-06-27 18:08:14 -0400
commit747b3c8302245699294b671d19b3d31d63f80bc1 (patch)
treead3d987bb38d5bdaed67e6aca1263fb06331f746 /src/commands/moderation
parent4176b6258e44e4a095376aaf0f4c687244243a69 (diff)
downloadtanzanite-747b3c8302245699294b671d19b3d31d63f80bc1.tar.gz
tanzanite-747b3c8302245699294b671d19b3d31d63f80bc1.tar.bz2
tanzanite-747b3c8302245699294b671d19b3d31d63f80bc1.zip
did this a while ago so I don't remeber what I did
Diffstat (limited to 'src/commands/moderation')
-rw-r--r--src/commands/moderation/ban.ts7
-rw-r--r--src/commands/moderation/kick.ts7
-rw-r--r--src/commands/moderation/mute.ts7
-rw-r--r--src/commands/moderation/role.ts5
4 files changed, 15 insertions, 11 deletions
diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts
index 7ce222a..9d7eb4d 100644
--- a/src/commands/moderation/ban.ts
+++ b/src/commands/moderation/ban.ts
@@ -1,4 +1,5 @@
import { Argument } from 'discord-akairo';
+import { ApplicationCommandOptionType } from 'discord-api-types';
import { CommandInteraction, Message, User } from 'discord.js';
import moment from 'moment';
import { BushCommand } from '../../lib/extensions/BushCommand';
@@ -52,19 +53,19 @@ export default class BanCommand extends BushCommand {
},
slashOptions: [
{
- type: 'USER',
+ type: ApplicationCommandOptionType.USER,
name: 'user',
description: 'Who would you like to ban?',
required: true
},
{
- type: 'STRING',
+ type: ApplicationCommandOptionType.STRING,
name: 'reason',
description: 'Why are they getting banned?',
required: false
},
{
- type: 'STRING',
+ type: ApplicationCommandOptionType.STRING,
name: 'time',
description: 'How long should they be banned for?',
required: false
diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts
index eed3038..d7fdfbd 100644
--- a/src/commands/moderation/kick.ts
+++ b/src/commands/moderation/kick.ts
@@ -1,6 +1,7 @@
+import { ApplicationCommandOptionType } from 'discord-api-types';
import { CommandInteraction, GuildMember, Message } from 'discord.js';
import { BushCommand } from '../../lib/extensions/BushCommand';
-import { BushSlashMessage } from '../../lib/extensions/BushInteractionMessage';
+import { BushSlashMessage } from '../../lib/extensions/BushSlashMessage';
import { Guild, ModLog, ModLogType } from '../../lib/models';
export default class KickCommand extends BushCommand {
@@ -32,13 +33,13 @@ export default class KickCommand extends BushCommand {
},
slashOptions: [
{
- type: 'USER',
+ type: ApplicationCommandOptionType.USER,
name: 'user',
description: 'The user to kick',
required: true
},
{
- type: 'STRING',
+ type: ApplicationCommandOptionType.STRING,
name: 'reason',
description: 'The reason to show in modlogs and audit log',
required: false
diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts
index 9b6ad70..eeb2d04 100644
--- a/src/commands/moderation/mute.ts
+++ b/src/commands/moderation/mute.ts
@@ -1,4 +1,5 @@
import { Argument } from 'discord-akairo';
+import { ApplicationCommandOptionType } from 'discord-api-types';
import { CommandInteraction, Message, User } from 'discord.js';
import moment from 'moment';
import { BushCommand } from '../../lib/extensions/BushCommand';
@@ -43,19 +44,19 @@ export default class MuteCommand extends BushCommand {
},
slashOptions: [
{
- type: 'USER',
+ type: ApplicationCommandOptionType.USER,
name: 'user',
description: 'The user to mute.',
required: true
},
{
- type: 'STRING',
+ type: ApplicationCommandOptionType.STRING,
name: 'reason',
description: 'Why the user is getting muted.',
required: false
},
{
- type: 'STRING',
+ type: ApplicationCommandOptionType.STRING,
name: 'time',
description: 'How long the user should be muted for.',
required: false
diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts
index f0918f0..4eb745d 100644
--- a/src/commands/moderation/role.ts
+++ b/src/commands/moderation/role.ts
@@ -1,4 +1,5 @@
/* eslint-disable @typescript-eslint/no-empty-function */
+import { ApplicationCommandOptionType } from 'discord-api-types';
import { GuildMember, Message, Role } from 'discord.js';
import { BushCommand } from '../../lib/extensions/BushCommand';
import AllowedMentions from '../../lib/utils/AllowedMentions';
@@ -57,13 +58,13 @@ export default class RoleCommand extends BushCommand {
],
slashOptions: [
{
- type: 'USER',
+ type: ApplicationCommandOptionType.USER,
name: 'user',
description: 'The user to add/remove the role on',
required: true
},
{
- type: 'ROLE',
+ type: ApplicationCommandOptionType.ROLE,
name: 'role',
description: 'The role to add/remove',
required: true