dc-Ragnarok / Fenrir

PHP Discord Interface
MIT License
4 stars 2 forks source link

Make REST properties readonly #19

Closed CommandString closed 1 year ago

CommandString commented 1 year ago
class Rest
{
    public readonly AuditLog $auditLog;
    public readonly Channel $channel;
    public readonly Emoji $emoji;
    public readonly GuildAutoModeration $guildAutoModeration;
    public readonly GuildScheduledEvent $guildScheduledEvent;
    public readonly GuildSticker $guildSticker;
    public readonly GuildTemplate $guildTemplate;
    public readonly Invite $invite;
    public readonly Sticker $sticker;
    public readonly GuildCommand $guildCommand;
    public readonly GlobalCommand $globalCommand;
    public readonly Webhook $webhook;
    public readonly User $user;

    // ...

NOTE: RestFake's implementation will need to be changed as you cannot assign readonly props from outside the class!