diff --git a/src/Commands/GenericmessageCommand.php b/src/Commands/GenericmessageCommand.php index c8d79fb..498b812 100644 --- a/src/Commands/GenericmessageCommand.php +++ b/src/Commands/GenericmessageCommand.php @@ -53,10 +53,7 @@ class GenericmessageCommand extends SystemCommand $chat_id = $message->getChat()->getId(); if(!in_array($chat_id, $allowed_chat_ids)) { - return Request::sendMessage([ - 'chat_id' => $chat_id, - 'text' => "Chat ID $chat_id not allowed", - ]); + return $this->replyToChat("Chat ID $chat_id not allowed"); } $text = $message->getText(true) ?? $message->getCaption();