Skip to content

Commit d1416a4

Browse files
committed
allow boolean for query param value
1 parent 75eb779 commit d1416a4

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/Discord/Endpoint.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,15 @@ public function bindAssoc(array $args): self
327327
/**
328328
* Adds a key-value query pair to the endpoint.
329329
*
330-
* @param string $key
331-
* @param string $value
330+
* @param string $key
331+
* @param string|bool $value
332332
*/
333-
public function addQuery(string $key, string $value): void
333+
public function addQuery(string $key, $value): void
334334
{
335+
if (! is_bool($value)) {
336+
$value = (string) $value;
337+
}
338+
335339
$this->query[$key] = $value;
336340
}
337341

src/Discord/Http.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Http
3737
*
3838
* @var string
3939
*/
40-
public const VERSION = 'v10.1.0';
40+
public const VERSION = 'v10.1.1';
4141

4242
/**
4343
* Current Discord HTTP API version.

0 commit comments

Comments
 (0)