discord-php / DiscordPHP

An API to interact with the popular messaging app Discord
MIT License
977 stars 236 forks source link

Interaction member caching nullify member status/presence #1131

Closed SQKo closed 1 year ago

SQKo commented 1 year ago

Environment

Describe the bug Reported by Discord User PV#4608 that interaction member status is null after interaction.

To Reproduce Steps to reproduce the behavior:

$discord->listenCommand('ping', function (Interaction $interaction) use ($discord) {
    var_dump($interaction->member->status);
    $interaction->acknowledge();
});

Expected behavior Member status should not be null when present

Screenshots

Additional context Member presence intent is enabled, and member is loaded. INTERACTION_CREATE event handler has no member presence status data, the cacheMember() was nullifying the internal fillable property status