Skip to content

Commit f654033

Browse files
committed
2 parents d5b4eac + 8c0c45e commit f654033

File tree

9 files changed

+32
-14
lines changed

9 files changed

+32
-14
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

.changeset/pre.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"mean-pandas-develop",
2020
"metal-glasses-repeat",
2121
"mighty-schools-happen",
22+
"nasty-weeks-invent",
2223
"perfect-needles-rush",
2324
"perfect-oranges-beg",
2425
"rare-owls-listen",
@@ -32,6 +33,7 @@
3233
"spicy-waves-compare",
3334
"sweet-dolls-beg",
3435
"tall-cups-shake",
36+
"unlucky-snails-suffer",
3537
"yellow-snakes-thank"
3638
]
3739
}
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+
add more error logging

dev/commands/file-loaded/guildTest.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ export default command({
88

99
dev: true,
1010

11-
guards: {
12-
mode: 'blacklist',
11+
// guards: {
12+
// mode: 'blacklist',
1313

14-
users: ['331151683067445251'],
14+
// users: ['331151683067445251'],
1515

16-
roles: ['740589901095108739'],
17-
},
16+
// roles: ['740589901095108739'],
17+
// },
1818

1919
run: ({ interaction }) =>
2020
interaction.reply({ embeds: [{ description: 'as' }] }),

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"typescript": "^4.6.4"
1313
},
1414
"scripts": {
15-
"dev": "pnpm -r dev --parallel",
16-
"dev-build": "pnpm build -r --parallel -- --watch",
17-
"dev-dev": "pnpm -r dev --parallel --filter dev",
15+
"dev": "pnpm --parallel -r dev",
16+
"dev-build": "pnpm --parallel -r build --watch",
17+
"dev-dev": "pnpm --filter dev -r dev",
1818
"build": "pnpm -r build",
1919
"release": "changeset publish"
2020
},

packages/jellycommands/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# jellycommands
22

3+
## 1.0.0-next.25
4+
5+
### Patch Changes
6+
7+
- fix config.messages.unknownCommand types ([`f204f4e`](https://github.com/ghostdevv/jellycommands/commit/f204f4e2a2bbf9898bfd9b3489c672c58786fca9))
8+
9+
* add more error logging ([`b9612d9`](https://github.com/ghostdevv/jellycommands/commit/b9612d913bcf0c7985783f5ec893037a5fcebaa9))
10+
311
## 1.0.0-next.24
412

513
### Patch Changes

packages/jellycommands/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jellycommands",
3-
"version": "1.0.0-next.24",
3+
"version": "1.0.0-next.25",
44
"author": "GHOST",
55
"license": "MIT",
66
"main": "dist/index.js",

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
/**

packages/jellycommands/src/util/request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function createRequest(token: string) {
2626

2727
if (errors || _errors)
2828
console.error(
29-
`[DISCORD API ERROR] ${JSON.stringify(
29+
`[DISCORD API ERROR] ${method.toUpperCase()} ${route}] ${JSON.stringify(
3030
errors || _errors,
3131
null,
3232
4,

0 commit comments

Comments
 (0)