replyToChat 2

This commit is contained in:
2022-12-30 01:29:35 +00:00
parent 1a54f12b7b
commit b558e7bb99

View File

@@ -53,10 +53,7 @@ class GenericmessageCommand extends SystemCommand
$chat_id = $message->getChat()->getId(); $chat_id = $message->getChat()->getId();
if(!in_array($chat_id, $allowed_chat_ids)) { if(!in_array($chat_id, $allowed_chat_ids)) {
return Request::sendMessage([ return $this->replyToChat("Chat ID $chat_id not allowed");
'chat_id' => $chat_id,
'text' => "Chat ID $chat_id not allowed",
]);
} }
$text = $message->getText(true) ?? $message->getCaption(); $text = $message->getText(true) ?? $message->getCaption();