From c432e9a4f9c8f3871548aa15d5cf4d6ae0d3689a Mon Sep 17 00:00:00 2001 From: Clement Desmidt Date: Tue, 6 Aug 2024 16:42:16 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20put=20back=20call=5Fuser=5Ffunc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot/Bot.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/Bot.php b/bot/Bot.php index ae0da97..cdfa45f 100644 --- a/bot/Bot.php +++ b/bot/Bot.php @@ -51,9 +51,9 @@ class Bot $preg_pattern = sprintf('#%s#i', $pattern); if (preg_match($preg_pattern, $sentence, $matches)) { if (is_callable($command)) { - $command($this); + call_user_func($command, $this); } else { - $command->getMessage($this, $matches); + call_user_func([$command, 'getMessage'], $this, $matches); } return; }