-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Guild bindings * Fix namespace & composer issue * Add guild traits * Add bindings and tests * Add get bans & get ban calls * Add member role management calls * Add more bindings * More guild bindings * Add bindings * Add binding * still a lot of bindings to go woo * Guild bindings almost done :D * cs & md * Add last of the guild bindings * Add missing strict type --------- Co-authored-by: Exan <[email protected]>
- Loading branch information
Showing
22 changed files
with
1,431 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Ragnarok\Fenrir\Enums; | ||
|
||
enum DefaultMessageNotifications: int | ||
{ | ||
case ALL_MESSAGES = 0; | ||
case ONLY_MENTIONS = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Ragnarok\Fenrir\Parts; | ||
|
||
class ActiveGuildThreads | ||
{ | ||
/** | ||
* @var \Ragnarok\Fenrir\Parts\Channel[] | ||
*/ | ||
public array $threads; | ||
|
||
/** | ||
* @var \Ragnarok\Fenrir\Parts\ThreadMember[] | ||
*/ | ||
public array $members; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Ragnarok\Fenrir\Parts; | ||
|
||
class GuildBan | ||
{ | ||
public ?string $reason; | ||
public User $user; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Ragnarok\Fenrir\Parts; | ||
|
||
use Ragnarok\Fenrir\Enums\Parts\GuildFeatures; | ||
|
||
class GuildPreview | ||
{ | ||
public string $id; | ||
public string $name; | ||
public ?string $icon; | ||
public ?string $splash; | ||
public ?string $discovery_splash; | ||
public array $emojis; | ||
/** | ||
* @var \Ragnarok\Fenrir\Enums\Parts\GuildFeatures[] | ||
*/ | ||
public array $features; | ||
public ?int $approximate_member_count; | ||
public ?int $approximate_presence_count; | ||
public ?string $description; | ||
/** | ||
* @var \Ragnarok\Fenrir\Parts\Sticker[] | ||
*/ | ||
public ?array $stickers; | ||
|
||
public function setFeatures(array $value): void | ||
{ | ||
$this->features = []; | ||
|
||
foreach ($value as $entry) { | ||
$this->features[] = GuildFeatures::from($entry); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Ragnarok\Fenrir\Parts; | ||
|
||
class PruneCount | ||
{ | ||
public ?int $pruned; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Ragnarok\Fenrir\Parts; | ||
|
||
class Widget | ||
{ | ||
public string $id; | ||
public string $name; | ||
public ?string $instant_invite; | ||
|
||
/** | ||
* @var \Ragnarok\Fenrir\Parts\Channel[] | ||
*/ | ||
public array $channels; | ||
|
||
/** | ||
* @var \Ragnarok\Fenrir\Parts\User[] | ||
*/ | ||
public array $users; | ||
public int $presence_count; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Ragnarok\Fenrir\Parts; | ||
|
||
class WidgetSettings | ||
{ | ||
public bool $enabled; | ||
public string $channel_id; | ||
} |
Oops, something went wrong.