Skip to content

Commit 8cf1c2b

Browse files
authored
fix(preconditions): fixed TextOnly and NewsOnly (#222)
1 parent e7ce612 commit 8cf1c2b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/preconditions/NewsOnly.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Precondition, PreconditionResult } from '../lib/structures/Precondition
55
export class CorePrecondition extends Precondition {
66
public run(message: Message): PreconditionResult {
77
return message.channel.type === 'news'
8-
? this.error({ identifier: Identifiers.PreconditionNewsOnly, message: 'You can only run this command in news channels.' })
9-
: this.ok();
8+
? this.ok()
9+
: this.error({ identifier: Identifiers.PreconditionNewsOnly, message: 'You can only run this command in news channels.' });
1010
}
1111
}

src/preconditions/TextOnly.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Precondition, PreconditionResult } from '../lib/structures/Precondition
55
export class CorePrecondition extends Precondition {
66
public run(message: Message): PreconditionResult {
77
return message.channel.type === 'text'
8-
? this.error({ identifier: Identifiers.PreconditionTextOnly, message: 'You can only run this command in text channels.' })
9-
: this.ok();
8+
? this.ok()
9+
: this.error({ identifier: Identifiers.PreconditionTextOnly, message: 'You can only run this command in text channels.' });
1010
}
1111
}

0 commit comments

Comments
 (0)