We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9f1e32 commit 37c83bdCopy full SHA for 37c83bd
src/lib/structures/arguments/Boolean.ts
@@ -8,8 +8,8 @@ export class BooleanType extends MessageArgumentTypeBase {
8
value;
9
10
validate(content: string): boolean {
11
- const yes = truthy.has(content.toLowerCase());
12
- const no = falsy.has(content.toLowerCase());
+ const yes = truthy.has(content?.toLowerCase());
+ const no = falsy.has(content?.toLowerCase());
13
14
if (!yes && !no) return false;
15
else {
src/lib/structures/arguments/User.ts
@@ -6,7 +6,7 @@ export class UserType extends MessageArgumentTypeBase {
6
matches;
7
- const matches = content.match(/([0-9]+)/);
+ const matches = content?.match(/([0-9]+)/);
if (!matches) return false;
0 commit comments