Skip to content

Commit

Permalink
Only process messages when @mentioned
Browse files Browse the repository at this point in the history
  • Loading branch information
valzargaming committed Oct 5, 2024
1 parent df27706 commit 5cf4f71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Civ13/MessageServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public function __afterConstruct()

public function handle(Message $message): ?PromiseInterface
{
if ($return = $this->messageHandler->handle($message)) return $return;
$message_array = $this->civ13->filterMessage($message);
if (! $message_array['called']) return null; // Not a command
if ($return = $this->messageHandler->handle($message)) return $return;
if (! $message_array['message_content_lower']) { // No command given
$random_responses = ['You can see a full list of commands by using the `help` command.'];
$random_responses = [
Expand Down

0 comments on commit 5cf4f71

Please sign in to comment.