Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ahdg6 committed Aug 22, 2024
1 parent 035bcf6 commit 1106dd2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/core/src/services/commander/commander.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Context } from '../../context';

import { CommandInstance } from './command';
import { Flags } from 'type-flag';
import { createLogger, logger } from '../../Logger';
import { createLogger } from '../../Logger';

import { search } from 'fast-fuzzy';
import { MessageSession, MessageType } from '../../types';
Expand Down Expand Up @@ -224,7 +224,9 @@ export class Commander {
if (commandInputMain === obj.name || obj.aliases.includes(commandInputMain)) {
this.ctx.serial(session, 'command/before-execute', obj, bot, session).then((result) => {
if (typeof result === 'string') {
bot.sendMessage(session.channelId, result, { quote: session.data.msg_id });
bot
.sendMessage(session.channelId, result, { quote: session.data.msg_id })
.catch(obj.handleError);
} else {
obj
.execute(args, bot, session)
Expand Down

0 comments on commit 1106dd2

Please sign in to comment.