We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 499c74c commit df21662Copy full SHA for df21662
src/Commands/AdminCommands/CleanupCommand.php
@@ -351,20 +351,14 @@ public function executeNoDb()
351
public function execute()
352
{
353
$message = $this->getMessage();
354
- $chat_id = $message->getChat()->getId();
+ $user_id = $message->getFrom()->getId();
355
$text = $message->getText(true);
356
357
$data = [
358
- 'chat_id' => $chat_id,
+ 'chat_id' => $user_id,
359
'parse_mode' => 'Markdown',
360
];
361
362
- if (!$message->getChat()->isPrivateChat()) {
363
- $data['text'] = '/cleanup command is only available in a private chat.';
364
-
365
- return Request::sendMessage($data);
366
- }
367
368
$settings = $this->getSettings($text);
369
$queries = $this->getQueries($settings);
370
0 commit comments