Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(preconditions): fixed TextOnly and NewsOnly #222

Merged
merged 4 commits into from
Jul 8, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix(TextOnly/Precondition): Typo
The condition that a channel be a text channel was wrong.
sawa-ko authored Jul 7, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 8a3548f7836756717cff210f4f29ce0776cd554e
4 changes: 2 additions & 2 deletions src/preconditions/TextOnly.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import { Precondition, PreconditionResult } from '../lib/structures/Precondition
export class CorePrecondition extends Precondition {
public run(message: Message): PreconditionResult {
return message.channel.type === 'text'
? this.error({ identifier: Identifiers.PreconditionTextOnly, message: 'You can only run this command in text channels.' })
: this.ok();
? this.ok();
: this.error({ identifier: Identifiers.PreconditionTextOnly, message: 'You can only run this command in text channels.' });
}
}