Skip to content

Commit

Permalink
suggested to edit message in dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
MahdiSaremi committed Dec 22, 2024
1 parent 1c1d47f commit cd5daa7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Action/Section/Dialog.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,21 @@ public function reload($message = null, array $args = [], ...$namedArgs)
return $dialogRegister->register()->editResponse($message, $args, ...$namedArgs);
}

/**
* Send or edit dialog
*
* @param $message
* @param array $args
* @param ...$namedArgs
* @return Message|null
*/
public function response($message = null, array $args = [], ...$namedArgs)
{
return isset($this->responseUsing) || !$this->update->callbackQuery ?
parent::response($message, $args, $namedArgs) :
$this->editResponse($message, $args, ...$namedArgs);
}


/**
* Send menu as message
Expand Down

0 comments on commit cd5daa7

Please sign in to comment.