aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation/warn.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-27 13:12:49 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-27 13:12:49 -0500
commite05f25f4b98cac3c2409cee9a664ab5ea6251467 (patch)
treef8e3dc4fde8f6deaa543b910acb9a725abbac999 /src/commands/moderation/warn.ts
parent84f246ebb5ddee984012d3043dcc67ffae806856 (diff)
downloadtanzanite-e05f25f4b98cac3c2409cee9a664ab5ea6251467.tar.gz
tanzanite-e05f25f4b98cac3c2409cee9a664ab5ea6251467.tar.bz2
tanzanite-e05f25f4b98cac3c2409cee9a664ab5ea6251467.zip
better typings and some other stuff
Diffstat (limited to 'src/commands/moderation/warn.ts')
-rw-r--r--src/commands/moderation/warn.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/commands/moderation/warn.ts b/src/commands/moderation/warn.ts
index 2212548..95e409d 100644
--- a/src/commands/moderation/warn.ts
+++ b/src/commands/moderation/warn.ts
@@ -1,11 +1,12 @@
import {
AllowedMentions,
+ ArgType,
BushCommand,
Moderation,
+ OptionalArgType,
type BushGuildMember,
type BushMessage,
- type BushSlashMessage,
- type BushUser
+ type BushSlashMessage
} from '#lib';
export default class WarnCommand extends BushCommand {
@@ -54,7 +55,7 @@ export default class WarnCommand extends BushCommand {
public override async exec(
message: BushMessage | BushSlashMessage,
- { user, reason, force }: { user: BushUser; reason: string; force: boolean }
+ { user, reason, force }: { user: ArgType<'user'>; reason: OptionalArgType<'string'>; force?: boolean }
) {
const member = message.guild!.members.cache.get(user.id) as BushGuildMember;
if (!member) return message.util.reply(`${util.emojis.error} I cannot warn users that are not in the server.`);