Skip to content

Commit

Permalink
test: remove discovery from text command
Browse files Browse the repository at this point in the history
  • Loading branch information
SocketSomeone committed Jun 6, 2022
1 parent 9d19578 commit d1588a6
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions test/text-commands.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@nestjs/common';
import { Arguments, ContextOf, Ctx, Discovery, TextCommand, TextCommandDiscovery } from '../src';
import { Arguments, ContextOf, Ctx, TextCommand } from '../src';
import { createApplication } from './utils.spec';

@Injectable()
Expand All @@ -10,12 +10,7 @@ class TextCommandsSpec {
}

@TextCommand({ name: 'length', description: 'length of message' })
public onLength(
@Ctx() [message]: ContextOf<'messageCreate'>,
@Arguments() args: string[],
@Discovery() discovery: TextCommandDiscovery
) {
console.log(discovery, discovery.isTextCommand());
public onLength(@Ctx() [message]: ContextOf<'messageCreate'>, @Arguments() args: string[]) {
return message.reply('Your message length - ' + args.join(' ').length);
}
}
Expand Down

0 comments on commit d1588a6

Please sign in to comment.