Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Commit

Permalink
[F] Fix cancellation order issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hykilpikonna committed Apr 21, 2020
1 parent e365bdf commit 37a3404
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/cc/moecraft/icq/command/CommandListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ public boolean check(EventMessage event)
event instanceof EventGroupMessage || event instanceof EventDiscussMessage);
CommandRunnable runnable = new CommandRunnable(event, args);

// 取消后续事件
if (!event.getBot().getConfig().isCommandsAlsoCallEvents())
{
return false;
}

// 运行指令
if (event.getBot().getConfig().isUseAsyncCommands())
{
Expand All @@ -63,6 +57,12 @@ public boolean check(EventMessage event)
{
runnable.run();
}

// 取消后续事件
if (!event.getBot().getConfig().isCommandsAlsoCallEvents())
{
return false;
}
}
catch (NotACommandException | CommandNotFoundException e)
{
Expand Down

0 comments on commit 37a3404

Please sign in to comment.