Skip to content

Commit f204f4e

Browse files
committed
fix: config.messages.unknownCommand types
1 parent b9612d9 commit f204f4e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.changeset/nasty-weeks-invent.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'jellycommands': patch
3+
---
4+
5+
fix config.messages.unknownCommand types

packages/jellycommands/src/JellyCommands/options.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import type { MessageOptions, ClientOptions } from 'discord.js';
1+
import type { ClientOptions, InteractionReplyOptions, MessagePayload } from 'discord.js';
22
import { BaseCommand } from './commands/base/BaseCommand.js';
33
import { snowflakeArray } from '../util/joi';
4-
import { MessagePayload } from 'discord.js';
54
import { Event } from './events/Event';
65
import Joi from 'joi';
76

@@ -24,7 +23,6 @@ export const schema = Joi.object({
2423
unknownCommand: Joi.alternatives()
2524
.try(
2625
Joi.string(),
27-
Joi.object().instance(MessagePayload),
2826
Joi.object(),
2927
)
3028
.default({
@@ -70,7 +68,7 @@ export interface JellyCommandsOptions {
7068
/**
7169
* This is sent when a unknown command is given
7270
*/
73-
unknownCommand?: string | MessagePayload | MessageOptions;
71+
unknownCommand?: string | MessagePayload | InteractionReplyOptions;
7472
};
7573

7674
/**

0 commit comments

Comments
 (0)