public function setConfirm($confirm)
{
if ($confirm instanceof ActionConfirmation) {
$this->confirm = $confirm;
return $this;
} elseif (is_array($confirm)) {
$this->confirm = new ActionConfirmation($confirm);
return $this;
}
throw new InvalidArgumentException('The action confirmation must be an instance of Maknz\\Slack\\ActionConfirmation or a keyed array');
}