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 fa246b5 commit b000059Copy full SHA for b000059
src/Traits/HasSharedLogic.php
@@ -77,11 +77,11 @@ public function normal(): static
77
/**
78
* Set the parse mode of the message.
79
*
80
- * @param ParseMode|null $mode The parse mode to use
+ * @param ParseMode|string $mode The parse mode to use
81
*/
82
- public function parseMode(?ParseMode $mode = null): static
+ public function parseMode(ParseMode|string $mode): static
83
{
84
- $this->payload['parse_mode'] = $mode?->value;
+ $this->payload['parse_mode'] = ($mode instanceof ParseMode) ? $mode->value : $mode;
85
86
return $this;
87
}
0 commit comments