Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
MaikoTan committed Feb 17, 2024
2 parents 9253acf + d109f37 commit 57a767e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export async function apply(ctx: Context, config: Config = {}): Promise<void> {
.command('hitokoto')
.alias('一言')
.option('type', `-t <type:string>`)
.option('min-length', `-l <length:int>`)
.option('max-length', `-L <length:int>`)
.option('minLength', `-l <length:int>`)
.option('maxLength', `-L <length:int>`)
.before(async ({ options, session }) => {
if (options?.['min-length'] && options?.['max-length']) {
if (options['min-length'] > options['max-length']) {
if (options?.minLength && options?.maxLength) {
if (options.minLength > options.maxLength) {
return session?.text('.min_length_gt_max_length')
}
}
Expand All @@ -37,8 +37,8 @@ export async function apply(ctx: Context, config: Config = {}): Promise<void> {
.action(async ({ options, session }) => {
const params = {
c: options?.type?.split(',') ?? config.defaultTypes,
min_length: options?.['min-length'] ?? config.minLength,
max_length: options?.['max-length'] ?? config.maxLength,
min_length: options?.minLength ?? config.minLength,
max_length: options?.maxLength ?? config.maxLength,
}

try {
Expand Down

0 comments on commit 57a767e

Please sign in to comment.